C# Type MetadataToken
Description
Type MetadataToken
gets a value that identifies a metadata
element.
Syntax
Type.MetadataToken
has the following syntax.
public virtual int MetadataToken { get; }
Example
//www. j a va2s. co m
using System;
internal class InternalOnly
{
public class Nested {}
}
public class Example
{
public class Nested {}
public static void Main()
{
Type t = typeof(InternalOnly.Nested);
Console.WriteLine(t.MetadataToken);
}
}
The code above generates the following result.