📌  相关文章
📜  c# 过时的类 - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:43.251000             🧑  作者: Mango

代码示例1
//The last parameter (true|false) determine if the use of class, property,
//function, etc is considered as error or not

[ObsoleteAttribute("Here you say why this class is obsolete", false)]
public class MyClass
{
   [ObsoleteAttribute("Here you say why this property is obsolete", false)]
   public string MyProperty
   {
       get {}
       set {}
   }
}