Attributes provide a powerful method of associating metadata, or declarative information , with code (assemblies, types, methods, properties, and so forth). After an attribute is associated with a program entity, the attribute can be queried at run time by using a technique called reflection.