In the .NET framework, attributes are used to define important metadata about methods, properties, and types to aid execution. During runtime, attributes are parsed in the CLR to determine how the code behaves. For instance, using the “serializable” attribute in a class tells the CLR that the class needs to be serialized during runtime.