Module.GetType Method (String, Boolean, Boolean)
Returns the specified type, specifying whether to make a case-sensitive search of the module and whether to throw an exception if the type cannot be found.
Assembly: mscorlib (in mscorlib.dll)
[<ComVisibleAttribute(true)>] abstract GetType : className:string * throwOnError:bool * ignoreCase:bool -> Type [<ComVisibleAttribute(true)>] override GetType : className:string * throwOnError:bool * ignoreCase:bool -> Type
- Type: System.String
The name of the type to locate. The name must be fully qualified with the namespace.
- Type: System.Boolean
true to throw an exception if the type cannot be found; false to return a null reference (Nothing in Visual Basic).
- Type: System.Boolean
true for case-insensitive search; otherwise, false.
className is a null reference (Nothing in Visual Basic).
The class initializers are invoked and an exception is thrown.
className is a zero-length string.
throwOnError is true, and the type cannot be found.
className requires a dependent assembly that could not be found.
className requires a dependent assembly that was found but could not be loaded.
The current assembly was loaded into the reflection-only context, and className requires a dependent assembly that was not preloaded.
className requires a dependent assembly, but the file is not a valid assembly.
className requires a dependent assembly which was compiled for a version of the runtime later than the currently loaded version.
The throwOnError parameter affects only what happens when the type is not found. It does not affect any other exceptions that might be thrown. In particular, if the type is found but cannot be loaded, TypeLoadException can be thrown even if throwOnError is false.
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. Calling Module.GetType 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 Assembly.GetType.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.