What is an Obsolete in C#.


Obsolete is an attribute which is used to mark a member of class or class that is no longer in use. You can pass a custom message to this attribute which will be shown when calling these members or class.

[Obsolete("This method is no longer in use! instead use isNumericNew")]
public int isNumeric()
{
    //Code here
}
public int isNumericNew()
{
    //Code here
}


When you will call isNumeric() method. It will show you custom warning as “This method is no longer in use! instead use isNumericNew”.
Note: In Obsolete keyword “O” should be in capital letter.