Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
CustomAttributeExtensions Class
Collapse the table of content
Expand the table of content

CustomAttributeExtensions Class

.NET Framework 4.6 and 4.5

Contains static methods for retrieving custom attributes.

System.Object
  System.Reflection.CustomAttributeExtensions

Namespace:  System.Reflection
Assemblies:   System.Reflection.Extensions (in System.Reflection.Extensions.dll)
  mscorlib (in mscorlib.dll)

public static class CustomAttributeExtensions

  NameDescription
Public methodStatic memberGetCustomAttribute(Assembly, Type)Retrieves a custom attribute of a specified type that is applied to a specified assembly.
Public methodStatic memberGetCustomAttribute(MemberInfo, Type)Retrieves a custom attribute of a specified type that is applied to a specified member.
Public methodStatic memberGetCustomAttribute(Module, Type)Retrieves a custom attribute of a specified type that is applied to a specified module.
Public methodStatic memberGetCustomAttribute(ParameterInfo, Type)Retrieves a custom attribute of a specified type that is applied to a specified parameter.
Public methodStatic memberGetCustomAttribute(MemberInfo, Type, Boolean)Retrieves a custom attribute of a specified type that is applied to a specified member, and optionally inspects the ancestors of that member.
Public methodStatic memberGetCustomAttribute(ParameterInfo, Type, Boolean)Retrieves a custom attribute of a specified type that is applied to a specified parameter, and optionally inspects the ancestors of that parameter.
Public methodStatic memberGetCustomAttribute<T>(Assembly)Retrieves a custom attribute of a specified type that is applied to a specified assembly.
Public methodStatic memberGetCustomAttribute<T>(MemberInfo)Retrieves a custom attribute of a specified type that is applied to a specified member.
Public methodStatic memberGetCustomAttribute<T>(Module)Retrieves a custom attribute of a specified type that is applied to a specified module.
Public methodStatic memberGetCustomAttribute<T>(ParameterInfo)Retrieves a custom attribute of a specified type that is applied to a specified parameter.
Public methodStatic memberGetCustomAttribute<T>(MemberInfo, Boolean)Retrieves a custom attribute of a specified type that is applied to a specified member, and optionally inspects the ancestors of that member.
Public methodStatic memberGetCustomAttribute<T>(ParameterInfo, Boolean)Retrieves a custom attribute of a specified type that is applied to a specified parameter, and optionally inspects the ancestors of that parameter.
Public methodStatic memberGetCustomAttributes(Assembly)Retrieves a collection of custom attributes that are applied to a specified assembly.
Public methodStatic memberGetCustomAttributes(MemberInfo)Retrieves a collection of custom attributes that are applied to a specified member.
Public methodStatic memberGetCustomAttributes(Module)Retrieves a collection of custom attributes that are applied to a specified module.
Public methodStatic memberGetCustomAttributes(ParameterInfo)Retrieves a collection of custom attributes that are applied to a specified parameter.
Public methodStatic memberGetCustomAttributes(Assembly, Type)Retrieves a collection of custom attributes of a specified type that are applied to a specified assembly.
Public methodStatic memberGetCustomAttributes(MemberInfo, Boolean)Retrieves a collection of custom attributes that are applied to a specified member, and optionally inspects the ancestors of that member.
Public methodStatic memberGetCustomAttributes(MemberInfo, Type)Retrieves a collection of custom attributes of a specified type that are applied to a specified member.
Public methodStatic memberGetCustomAttributes(Module, Type)Retrieves a collection of custom attributes of a specified type that are applied to a specified module.
Public methodStatic memberGetCustomAttributes(ParameterInfo, Boolean)Retrieves a collection of custom attributes that are applied to a specified parameter, and optionally inspects the ancestors of that parameter.
Public methodStatic memberGetCustomAttributes(ParameterInfo, Type)Retrieves a collection of custom attributes of a specified type that are applied to a specified parameter.
Public methodStatic memberGetCustomAttributes(MemberInfo, Type, Boolean)Retrieves a collection of custom attributes of a specified type that are applied to a specified member, and optionally inspects the ancestors of that member.
Public methodStatic memberGetCustomAttributes(ParameterInfo, Type, Boolean)Retrieves a collection of custom attributes of a specified type that are applied to a specified parameter, and optionally inspects the ancestors of that parameter.
Public methodStatic memberGetCustomAttributes<T>(Assembly)Retrieves a collection of custom attributes of a specified type that are applied to a specified assembly.
Public methodStatic memberGetCustomAttributes<T>(MemberInfo)Retrieves a collection of custom attributes of a specified type that are applied to a specified member.
Public methodStatic memberGetCustomAttributes<T>(Module)Retrieves a collection of custom attributes of a specified type that are applied to a specified module.
Public methodStatic memberGetCustomAttributes<T>(ParameterInfo)Retrieves a collection of custom attributes of a specified type that are applied to a specified parameter.
Public methodStatic memberGetCustomAttributes<T>(MemberInfo, Boolean)Retrieves a collection of custom attributes of a specified type that are applied to a specified member, and optionally inspects the ancestors of that member.
Public methodStatic memberGetCustomAttributes<T>(ParameterInfo, Boolean)Retrieves a collection of custom attributes of a specified type that are applied to a specified parameter, and optionally inspects the ancestors of that parameter.
Public methodStatic memberIsDefined(Assembly, Type)Indicates whether custom attributes of a specified type are applied to a specified assembly.
Public methodStatic memberIsDefined(MemberInfo, Type)Indicates whether custom attributes of a specified type are applied to a specified member.
Public methodStatic memberIsDefined(Module, Type)Indicates whether custom attributes of a specified type are applied to a specified module.
Public methodStatic memberIsDefined(ParameterInfo, Type)Indicates whether custom attributes of a specified type are applied to a specified parameter.
Public methodStatic memberIsDefined(MemberInfo, Type, Boolean)Indicates whether custom attributes of a specified type are applied to a specified member, and, optionally, applied to its ancestors.
Public methodStatic memberIsDefined(ParameterInfo, Type, Boolean)Indicates whether custom attributes of a specified type are applied to a specified parameter, and, optionally, applied to its ancestors.
Top

.NET Framework

Supported in: 4.6, 4.5

.NET for Windows Phone apps

Supported in: Windows Phone 8.1, Windows Phone Silverlight 8.1, Windows Phone Silverlight 8

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2015 Microsoft