Table of Contents

Property MetadataToken

Namespace
Microsoft.Samples.Debugging.CorMetadata
Assembly
corapi.dll

MetadataToken

Gets a value that identifies a metadata element.

public override int MetadataToken { get; }

Property Value

int

A value which, in combination with Module, uniquely identifies a metadata element.

Exceptions

InvalidOperationException

The current MemberInfo represents an array method, such as Address, on an array type whose element type is a dynamic type that has not been completed. To get a metadata token in this case, pass the MemberInfo object to the GetMethodToken(MethodInfo) method; or use the GetArrayMethodToken(Type, string, CallingConventions, Type, Type[]) method to get the token directly, instead of using the GetArrayMethod(Type, string, CallingConventions, Type, Type[]) method to get a MethodInfo first.