Attributes defines or demands some particular characteristics of a .Net class. If you declare an attribute on a class, it is like either notifying or demanding the CLR that this class needs to be treated in some particular manner or that class is having some particular characteristic
Applying the [Serializable] attribute to a class informs the execution runtime that an instance's fields can be serialized and desterilized
Applying the [DllImport] attribute to a method notifies the CLR that the implementation of the method is actually in unmanaged code contained in the specified DLL.
Applying the [AssemblyVersion] attribute to an assembly sets the version number of the assembly which is just a characteristic property used for identification
These attributes are recorded in that particula .net type’s metadata table. This extensible metadata information can be queried at run time to dynamically alter the way code executes
There are so many such in-built attributes available in .Net. All of them derives or inherits from System.attribute. This helps us in building custom attributes. We can make a class inherit from System.attribute and define our own attribute rules or behaviors