0 out of 1 rated this helpful - Rate this topic

ModuleBuilder.GetType Method (String, Boolean)

Gets the named type defined in the module optionally ignoring the case of the type name.

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

[ComVisibleAttribute(true)] 
public override Type GetType (
	string className,
	bool ignoreCase
)
/** @attribute ComVisibleAttribute(true) */ 
public Type GetType (
	String className, 
	boolean ignoreCase
)
ComVisibleAttribute(true) 
public override function GetType (
	className : String, 
	ignoreCase : boolean
) : Type

Parameters

className

The name of the Type to get.

ignoreCase

If true, the search is case-insensitive. If false, the search is case-sensitive.

Return Value

The requested type. Returns a null reference (Nothing in Visual Basic) if the type is not found.
Exception typeCondition

ArgumentException

Length of className is zero.

-or-

The length of className is greater than 1023.

ArgumentNullException

className is a null reference (Nothing in Visual Basic).

SecurityException

The requested Type is non-public and the caller does not have ReflectionPermission to reflect non-public objects outside the current assembly.

TargetInvocationException

A class initializer is invoked and throws an exception.

Do not use this method to generate array types, pointer types, or byref types. Use the TypeBuilder.MakeArrayType, TypeBuilder.MakePointerType, and TypeBuilder.MakeByRefType methods instead.

  • ReflectionPermission  SecurityAction.Demand, ReflectionEmit

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0
Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.