kjcain
5/25/2016 - 4:34 PM

Notify users when an obsolete method is being used. From http://www.developer.com/net/top-10-tips-for-c-programmers.html

Notify users when an obsolete method is being used.

From http://www.developer.com/net/top-10-tips-for-c-programmers.html

// This will only provide a warning
[Obsolete("This method will be deprecated soon. You could use XYZ alternatively.")]
public void MyComponentLegacyMethod()
{
  //Here is the implementation
}

// This will cause some kind of error
[Obsolete("This method will be deprecated soon. You could use XYZ alternatively.", true)]
public void MyComponentLegacyMethod()
{
  //Here is the implementation
}