VB.NET 是否有能力弃用代码?
我知道在C#中有“属性”,在java中有标签;除了留下 'todo:
... 之外,VB.NET 中还有类似的东西吗?
最佳答案
VB.NET 中也有属性:
- https://msdn.microsoft.com/en-us/library/system.obsoleteattribute(v=vs.110).aspx
- http://www.vb-helper.com/howto_net_obsolete_attribute.html
看起来像这样(在你的函数之前)
<Obsolete("This method is deprecated, use XXXX instead.")> _
从 VB.NET 10(.NET 4 及更高版本)开始,我们 no longer need the underscore .
<Obsolete("This method is deprecated, use XXXX instead.")>
关于vb.net - 在 VB.NET 中,我可以将函数标记为已弃用吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/648876/