Breyta

Deila með


MemberInfoExtensions.GetMetadataToken(MemberInfo) Method

Definition

Gets a metadata token for the given member, if available.

public:
[System::Runtime::CompilerServices::Extension]
 static int GetMetadataToken(System::Reflection::MemberInfo ^ member);
public static int GetMetadataToken (this System.Reflection.MemberInfo member);
static member GetMetadataToken : System.Reflection.MemberInfo -> int
<Extension()>
Public Function GetMetadataToken (member As MemberInfo) As Integer

Parameters

member
MemberInfo

The member from which to retrieve the token, as reftype.

Returns

An integer representing the metadata token. The returned token is never nil. If unavailable, an exception is thrown.

Exceptions

There is no metadata token available.

Remarks

This method throws an exception if a metadata token is not available for the specified member. You can call HasMetadataToken to determine whether a metadata token is available before calling this method.

Applies to