NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Attribute.GetCustomAttribute (MemberInfo, Type)

Returns an instance of attributeType or a null reference (in Visual Basic Nothing) if non-exists on the given element.

[Visual Basic]
Overloads Public Shared Function GetCustomAttribute( _
   ByVal element As MemberInfo, _
   ByVal attributeType As Type _
) As Attribute
[C#]
public static Attribute GetCustomAttribute(
   MemberInfo element,
   Type attributeType
);
[C++]
public: static Attribute* GetCustomAttribute(
   MemberInfo* element,
   Type* attributeType
);
[JScript]
public static function GetCustomAttribute(
   element : MemberInfo,
   attributeType : Type
) : Attribute;

Parameters

element
The member to search for the custom attribute on.
attributeType
The type of the attribute to be returned.

Return Value

An instance of attributeType that was assigned to this member or a null reference (Nothing) if none exists.

Exceptions

Exception Type Condition
AmbiguousMatchException If there is more than one attribute of type attributeType defined on this element.

See Also

Attribute Class | Attribute Members | System Namespace | Attribute.GetCustomAttribute Overload List