Obsolete c# code example
Example 1: c# mark as deprecated
[Obsolete("Method1 is deprecated, please use Method2 instead.")]
public void Method1()
{ … }
Example 2: c# obsolete class
//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 {}
}
}