CustomAttributeExtensions Class

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Contains static methods for retrieving custom attributes.

Inheritance Hierarchy

System..::.Object
System.Reflection..::.CustomAttributeExtensions

Namespace: System.Reflection
Assembly: mscorlib (in mscorlib.dll)

Syntax

<ExtensionAttribute> _
Public NotInheritable Class CustomAttributeExtensions
public static class CustomAttributeExtensions

Methods

Name Description
GetCustomAttribute(Assembly, Type) Retrieves a custom attribute of a specified type that is applied to a specified assembly.
GetCustomAttribute(MemberInfo, Type) Retrieves a custom attribute of a specified type that is applied to a specified member.
GetCustomAttribute(Module, Type) Retrieves a custom attribute of a specified type that is applied to a specified module.
GetCustomAttribute(ParameterInfo, Type) Retrieves a custom attribute of a specified type that is applied to a specified parameter.
GetCustomAttribute(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.
GetCustomAttribute(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.
GetCustomAttribute<(Of <(T>)>)(Assembly) Retrieves a custom attribute of a specified type that is applied to a specified assembly.
GetCustomAttribute<(Of <(T>)>)(MemberInfo) Retrieves a custom attribute of a specified type that is applied to a specified member.
GetCustomAttribute<(Of <(T>)>)(Module) Retrieves a custom attribute of a specified type that is applied to a specified module.
GetCustomAttribute<(Of <(T>)>)(ParameterInfo) Retrieves a custom attribute of a specified type that is applied to a specified parameter.
GetCustomAttribute<(Of <(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.
GetCustomAttribute<(Of <(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.
GetCustomAttributes(Assembly) Retrieves a collection of custom attributes that are applied to a specified assembly.
GetCustomAttributes(MemberInfo) Retrieves a collection of custom attributes that are applied to a specified member.
GetCustomAttributes(Module) Retrieves a collection of custom attributes that are applied to a specified module.
GetCustomAttributes(ParameterInfo) Retrieves a collection of custom attributes that are applied to a specified parameter.
GetCustomAttributes(Assembly, Type) Retrieves a collection of custom attributes of a specified type that are applied to a specified assembly.
GetCustomAttributes(MemberInfo, Boolean) Retrieves a collection of custom attributes that are applied to a specified member, and optionally inspects the ancestors of that member.
GetCustomAttributes(MemberInfo, Type) Retrieves a collection of custom attributes of a specified type that are applied to a specified member.
GetCustomAttributes(Module, Type) Retrieves a collection of custom attributes of a specified type that are applied to a specified module.
GetCustomAttributes(ParameterInfo, Boolean) Retrieves a collection of custom attributes that are applied to a specified parameter, and optionally inspects the ancestors of that parameter.
GetCustomAttributes(ParameterInfo, Type) Retrieves a collection of custom attributes of a specified type that are applied to a specified parameter.
GetCustomAttributes(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.
GetCustomAttributes(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.
GetCustomAttributes<(Of <(T>)>)(Assembly) Retrieves a collection of custom attributes of a specified type that are applied to a specified assembly.
GetCustomAttributes<(Of <(T>)>)(MemberInfo) Retrieves a collection of custom attributes of a specified type that are applied to a specified member.
GetCustomAttributes<(Of <(T>)>)(Module) Retrieves a collection of custom attributes of a specified type that are applied to a specified module.
GetCustomAttributes<(Of <(T>)>)(ParameterInfo) Retrieves a collection of custom attributes of a specified type that are applied to a specified parameter.
GetCustomAttributes<(Of <(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.
GetCustomAttributes<(Of <(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.
IsDefined(Assembly, Type) Indicates whether custom attributes of a specified type are applied to a specified assembly.
IsDefined(MemberInfo, Type) Indicates whether custom attributes of a specified type are applied to a specified member.
IsDefined(Module, Type) Indicates whether custom attributes of a specified type are applied to a specified module.
IsDefined(ParameterInfo, Type) Indicates whether custom attributes of a specified type are applied to a specified parameter.
IsDefined(MemberInfo, Type, Boolean) Indicates whether custom attributes of a specified type are applied to a specified member, and, optionally, applied to its ancestors.
IsDefined(ParameterInfo, Type, Boolean) Indicates whether custom attributes of a specified type are applied to a specified parameter, and, optionally, applied to its ancestors.

Top

Version Information

Windows Phone OS

Supported in: 8.1, 8.0

Thread Safety

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

See Also

Reference

System.Reflection Namespace