本文介绍了警告代码cs0618和cs0612有什么区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经看到以下两个警告代码都被抛出,以利用标记为过时的代码。
cs0618 和 cs0612 。
0618是2级,而0612是1级。有谁知道这些代码之间的区别是什么,什么原因导致抛出一个而不是另一个?解决方案我认为
[已淘汰] CS0612 [ Obsolete(使用newMethod代替,false)] // CS0618 [Obsolete(使用newMethod代替,true)] // CS0619
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?
解决方案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
更多推荐
警告代码cs0618和cs0612有什么区别
发布评论