MetadataTokens.GetToken Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GetToken(MetadataReader, EntityHandle) |
Gets the metadata token of the specified |
GetToken(MetadataReader, Handle) |
Gets the metadata token of the specified |
GetToken(EntityHandle) |
Gets the metadata token of the specified |
GetToken(Handle) |
Gets the metadata token of the specified |
GetToken(MetadataReader, EntityHandle)
- Source:
- MetadataTokens.cs
- Source:
- MetadataTokens.cs
- Source:
- MetadataTokens.cs
- Source:
- MetadataTokens.cs
Gets the metadata token of the specified handle
in the context of reader
.
public:
[System::Runtime::CompilerServices::Extension]
static int GetToken(System::Reflection::Metadata::MetadataReader ^ reader, System::Reflection::Metadata::EntityHandle handle);
public static int GetToken (this System.Reflection.Metadata.MetadataReader reader, System.Reflection.Metadata.EntityHandle handle);
static member GetToken : System.Reflection.Metadata.MetadataReader * System.Reflection.Metadata.EntityHandle -> int
<Extension()>
Public Function GetToken (reader As MetadataReader, handle As EntityHandle) As Integer
Parameters
- reader
- MetadataReader
- handle
- EntityHandle
Returns
Metadata token.
Exceptions
The operation is not supported for the specified handle
.
Applies to
GetToken(MetadataReader, Handle)
- Source:
- MetadataTokens.cs
- Source:
- MetadataTokens.cs
- Source:
- MetadataTokens.cs
- Source:
- MetadataTokens.cs
Gets the metadata token of the specified handle
in the context of reader
.
public:
[System::Runtime::CompilerServices::Extension]
static int GetToken(System::Reflection::Metadata::MetadataReader ^ reader, System::Reflection::Metadata::Handle handle);
public static int GetToken (this System.Reflection.Metadata.MetadataReader reader, System.Reflection.Metadata.Handle handle);
static member GetToken : System.Reflection.Metadata.MetadataReader * System.Reflection.Metadata.Handle -> int
<Extension()>
Public Function GetToken (reader As MetadataReader, handle As Handle) As Integer
Parameters
- reader
- MetadataReader
- handle
- Handle
Returns
Metadata token.
Exceptions
Handle represents a metadata entity that doesn't have a token. A token can only be retrieved for a metadata table handle or a heap handle of type UserString.
The operation is not supported for the specified handle
.
Applies to
GetToken(EntityHandle)
- Source:
- MetadataTokens.cs
- Source:
- MetadataTokens.cs
- Source:
- MetadataTokens.cs
- Source:
- MetadataTokens.cs
Gets the metadata token of the specified handle
.
public:
static int GetToken(System::Reflection::Metadata::EntityHandle handle);
public static int GetToken (System.Reflection.Metadata.EntityHandle handle);
static member GetToken : System.Reflection.Metadata.EntityHandle -> int
Public Function GetToken (handle As EntityHandle) As Integer
Parameters
- handle
- EntityHandle
Returns
Metadata token, or 0 if handle
can only be interpreted in a context of a specific MetadataReader.
Applies to
GetToken(Handle)
- Source:
- MetadataTokens.cs
- Source:
- MetadataTokens.cs
- Source:
- MetadataTokens.cs
- Source:
- MetadataTokens.cs
Gets the metadata token of the specified handle
.
public:
static int GetToken(System::Reflection::Metadata::Handle handle);
public static int GetToken (System.Reflection.Metadata.Handle handle);
static member GetToken : System.Reflection.Metadata.Handle -> int
Public Function GetToken (handle As Handle) As Integer
Parameters
- handle
- Handle
Returns
Metadata token, or 0 if handle
can only be interpreted in a context of a specific MetadataReader.
Exceptions
Handle represents a metadata entity that doesn't have a token. A token can only be retrieved for a metadata table handle or a heap handle of type UserString.