Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have seen both of the following warning codes being thrown for utilization of code marked obsolete.

cs0618 and cs0612.

0618 is Level 2 and 0612 is level 1 according to the documentation. Does anyone know what the difference is between these codes is and what causes one to be thrown instead of the other?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
381 views
Welcome To Ask or Share your Answers For Others

1 Answer

I think the difference is that one contains a message and the other doesn't.

[Obsolete]                                 ?// CS0612
[Obsolete("Use newMethod instead", false)]  // CS0618
[Obsolete("Use newMethod instead", true)]  ?// CS0619

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...