System.Reflection.Module.GetType Method

Returns the specified type, searching the module with the specified case sensitivity.

Syntax

[System.Runtime.InteropServices.ComVisible(true)]
public virtual Type GetType (string className, bool ignoreCase)

Parameters

className
The name of the type to locate. The name must be fully qualified with the namespace.
ignoreCase
true for case-insensitive search; otherwise, false.

Returns

A Type object representing the given type, if the type is in this module; otherwise, null.

Remarks

Note:

If the type has been forwarded to another assembly, it is still returned by this method. For information on type forwarding, see Type Forwarding in the Common Language Runtime.

A type can be retrieved from a specific module using Module.GetType(string, bool). Calling Module.GetType(string, bool) on the module that contains the manifest will not search the entire assembly. To retrieve a type from an assembly, regardless of which module it is in, you must call erload:System.Reflection.Assembly.GetType.

Requirements

Namespace: System.Reflection
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0