The Microsoft .NET Framework makes life easy by extensively supporting attributes. You could add flavor to your code by using the existing attributes or you could define and design your own attributes. The base class for attributes is System.Attribute.
Using existing attributes is relatively easier and Microsoft has provided you with a huge list of attributes that you could use. You must have definitely developed simple console applications.
static void Main(string args)
The [STAThread ] annotated before the main method is an attribute that marks a thread to use the Single-Threaded COM Apartment if COM is needed. SImilary if you have developed web services than you must have seen the attribute [webmethod] annotated before methods act as web services. Thus using these attributes is pretty easy .
We shall now delve into how to write our own custom attributes. Writing custom attribute greatly helps in annotating pieces of software code according to our needs. The basis for Attributes is the System.Attribute class.