MemberInfoExtensions class

Contains extensions for MemberInfo class

Namespace: TypeLite.Extensions

Methods

Name Description
GetCustomAttribute<TType> Retrieves a custom attribute of a specified type that is applied to a specified member.

MemberInfoExtensions.GetCustomAttribute<TType> method

Retrieves a custom attribute of a specified type that is applied to a specified member.

Syntax

Parameters

MemberInfo memberInfo
The member to inspect.
bool inherit
true to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks.

Returns

TType
A custom attribute that matches T, or null if no such attribute is found.