MemberInfo::MetadataToken Property

Gets a value that identifies a metadata element.

Namespace:  System.Reflection
Assembly:  mscorlib (in mscorlib.dll)

No code example is currently available or this language may not be supported.

Property Value

Type: System::Int32
A value which, in combination with Module, uniquely identifies a metadata element.

ExceptionCondition
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 ModuleBuilder::GetMethodToken method; or use the ModuleBuilder::GetArrayMethodToken method to get the token directly, instead of using the ModuleBuilder::GetArrayMethod method to get a MethodInfo first.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show: