System.Reflection.CustomAttributeExtensions.GetCustomAttributes Method

Retrieves a collection of custom attributes that are applied to a specified member, and optionally inspects the ancestors of that member.

Syntax

public static IEnumerable<Attribute> GetCustomAttributes (this MemberInfo element, bool inherit)

Parameters

element
The member to inspect.
inherit
true to inspect the ancestors of element; otherwise, false.

Returns

A collection of the custom attributes that are applied to element that match the specified criteria, or an empty collection if no such attributes exist.

Remarks

Documentation for this section has not yet been entered.

Requirements

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