ModuleBuilder::GetTypeToken Method (Type^)
Returns the token used to identify the specified type within this module.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- type
-
Type:
System::Type^
The type object that represents the class type.
Return Value
Type: System.Reflection.Emit::TypeTokenThe token used to identify the given type within this module.
| Exception | Condition |
|---|---|
| ArgumentException | type is a ByRef type. |
| ArgumentNullException | type is null. |
| InvalidOperationException | This is a non-transient module that references a transient module. |
Tokens are used in Microsoft intermediate language (MSIL) instructions to identify objects. Tokens are relative to the module in which they are contained. For example, the token value for String is likely to be different from module to module. When GetTypeToken is invoked, a reference is added to the module. The reference becomes a permanent part of the module; multiple calls with the same argument have no additional effect.
Available since 1.1
Silverlight
Available since 2.0