ModuleBuilder.GetTypeToken Method (String)

 

Returns the token used to identify the type with the specified name.

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

public TypeToken GetTypeToken(
	string name
)

Parameters

name
Type: System.String

The name of the class, including the namespace.

Return Value

Type: System.Reflection.Emit.TypeToken

The token used to identify the type with the specified name within this module.

Exception Condition
ArgumentException

name is the empty string ("").

-or-

name represents a ByRef type.

ArgumentNullException

name is null.

-or-

The type specified by name could not be found.

InvalidOperationException

This is a non-transient module that references a transient module.

This method is useful for clients of the MethodRental class who want to directly modify the body of a method.

.NET Framework
Available since 1.1
Silverlight
Available since 2.0
Return to top
Show: