In C#, attributes are classes that inherit from the Attribute base class . Any class that inherits from Attribute can be used as a sort of “tag” on other pieces of code. For instance, there is an attribute called ObsoleteAttribute . This is used to signal that code is obsolete and shouldn’t be used anymore.
Read moreAre Java annotations useful?
These annotations generate or suppress compiler warnings and errors. Applying them consistently is often a good practice since adding them can prevent future programmer error .
Read more