ReflectionUtils.GetCustomAttribute method

Version 1.1.28
.NET Framework 4.8
Namespace Skybrud.Essentials.Reflection
Assembly Skybrud.Essentials.dll

GetCustomAttribute<T>(Enum)

Static

Returns the first attribute of type T, or null if no matching attributes are found.

public static T GetCustomAttribute<T>(Enum value)

Type Parameters

T

The type of the attribute to return.

Parameters

value Enum

The enum value to get the attribute for.

Returns

T

An instance of T, or null if no matching attributes are found.

GetCustomAttribute<T>(MemberInfo)

Static

Returns the first attribute of type T, or null if no matching attributes are found.

public static T GetCustomAttribute<T>(MemberInfo member)

Type Parameters

T

The type of the attribute to return.

Parameters

member MemberInfo

The member holding the attribute.

Returns

T

An instance of T, or null if no matching attributes are found.

GetCustomAttribute<T>(Type)

Static

Returns the first attribute of type T, or null if no matching attributes are found.

public static T GetCustomAttribute<T>(Type type)

Type Parameters

T

The type of the attribute to return.

Parameters

type Type

The type holding the attribute.

Returns

T

An instance of T, or null if no matching attributes are found.