This topic has not yet been rated - Rate this topic

Attribute.GetCustomAttribute Method

April 12, 2014

Retrieves a custom attribute of a specified type applied to an assembly, module, type member, or method parameter.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  NameDescription
Public method Static member GetCustomAttribute(Assembly, Type) Retrieves a custom attribute applied to a specified assembly. Parameters specify the assembly and the type of the custom attribute to search for.
Public method Static member GetCustomAttribute(MemberInfo, Type) Retrieves a custom attribute applied to a member of a type. Parameters specify the member, and the type of the custom attribute to search for.
Public method Static member GetCustomAttribute(Module, Type) Retrieves a custom attribute applied to a module. Parameters specify the module, and the type of the custom attribute to search for.
Public method Static member GetCustomAttribute(ParameterInfo, Type) Retrieves a custom attribute applied to a method parameter. Parameters specify the method parameter, and the type of the custom attribute to search for.
Public method Static member GetCustomAttribute(Assembly, Type, Boolean) Retrieves a custom attribute applied to an assembly. Parameters specify the assembly, the type of the custom attribute to search for, and an ignored search option.
Public method Static member GetCustomAttribute(MemberInfo, Type, Boolean) Retrieves a custom attribute applied to a member of a type. Parameters specify the member, the type of the custom attribute to search for, and whether to search ancestors of the member.
Public method Static member GetCustomAttribute(Module, Type, Boolean) Retrieves a custom attribute applied to a module. Parameters specify the module, the type of the custom attribute to search for, and an ignored search option.
Public method Static member GetCustomAttribute(ParameterInfo, Type, Boolean) Retrieves a custom attribute applied to a method parameter. Parameters specify the method parameter, the type of the custom attribute to search for, and whether to search ancestors of the method parameter.
Top

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.