Sometimes I see them with methods, classes etc. What does it do? When should i use them? Example:
[Obsolete]
public static void MyMethod()
{
//some code
}
Sometimes I see them with methods, classes etc. What does it do? When should i use them? Example:
[Obsolete]
public static void MyMethod()
{
//some code
}
An attribute is a declarative tag that is used to convey information to runtime about the behaviors of various elements like classes, methods, structures, enumerators, assemblies etc. in your program. You can add declarative information to a program by using an attribute https://msdn.microsoft.com/en-us/library/aa288454(v=vs.71).aspx