TypeExtensions.GetFirstOrDefaultCustomAttribute<T> Method (Type)

 

Applies To: Dynamics CRM 2015

Returns the first custom attribute of a given type.

Namespace:   Microsoft.Xrm.Client
Assembly:  Microsoft.Xrm.Client (in Microsoft.Xrm.Client.dll)

Syntax

public static T GetFirstOrDefaultCustomAttribute<T>(
    this Type type
)
where T : Attribute
public:
generic<typename T>
where T : Attribute
[ExtensionAttribute]
static T GetFirstOrDefaultCustomAttribute(
    Type^ type
)
static member GetFirstOrDefaultCustomAttribute<'T when 'T : Attribute> : 
        type:Type -> 'T
<ExtensionAttribute>
Public Shared Function GetFirstOrDefaultCustomAttribute(Of T As Attribute) (
    type As Type
) As T

Parameters

Return Value

Type: T

Type: String
The first custom attribute of the specified type.

Type Parameters

  • T
    Type T.

See Also

TypeExtensions Class
Microsoft.Xrm.Client Namespace
Developer extensions for Microsoft Dynamics CRM 2015

Return to top

© 2017 Microsoft. All rights reserved. Copyright