Inspired by an SO question. The Attribute class has several overloads for the IsDefined() method. Covered are attributes applied to Assembly, Module, MemberInfo, ParameterInfo.
There's a System.Attribute.IsDefined(MemberInfo element, Type attributeType, bool inherit)
and System.Type
derives from System.Reflection.MemberInfo
.
An assembly, which is the top-level container of any .NET assembly has one or more modules. Each module then contains types and types can have members such as properties, methods or even other types (nested types). That's why System.Type
derives from MemberInfo
so that the object model allows for types to work as containers all things members, including other types.