ModuleBuilder.GetType 메서드

정의

모듈에 정의된 명명된 형식을 가져옵니다.

오버로드

Name Description
GetType(String)

모듈에 정의된 명명된 형식을 가져옵니다.

GetType(String, Boolean)

필요에 따라 형식 이름의 대/소문자를 무시하고 모듈에 정의된 명명된 형식을 가져옵니다.

GetType(String, Boolean, Boolean)

필요에 따라 형식 이름의 대/소문자를 무시하고 모듈에 정의된 명명된 형식을 가져옵니다. 필요에 따라 형식을 찾을 수 없는 경우 예외를 throw합니다.

GetType(String)

모듈에 정의된 명명된 형식을 가져옵니다.

public:
 override Type ^ GetType(System::String ^ className);
public override Type GetType(string className);
[System.Runtime.InteropServices.ComVisible(true)]
public override Type GetType(string className);
override this.GetType : string -> Type
[<System.Runtime.InteropServices.ComVisible(true)>]
override this.GetType : string -> Type
Public Overrides Function GetType (className As String) As Type

매개 변수

className
String

가져올 이름입니다 Type .

반품

이 모듈에서 형식이 정의된 경우 요청된 형식입니다. 그렇지 않으면 . null

특성

예외

className 길이가 0이거나 1023보다 큽니다.

classNamenull입니다.

요청 Type 된 개체가 public이 아니고 호출자가 현재 어셈블리 외부에 공용이 아닌 개체를 반영할 필요가 ReflectionPermission 없습니다.

클래스 이니셜라이저가 호출되고 예외가 throw됩니다.

를 로드하는 Type동안 오류가 발생했습니다.

설명

이 메서드를 사용하여 배열 형식, 포인터 형식 또는 바이리프 형식을 생성하지 마세요. TypeBuilder.MakeArrayType대신 , TypeBuilder.MakePointerTypeTypeBuilder.MakeByRefType 메서드를 사용합니다.

적용 대상

GetType(String, Boolean)

필요에 따라 형식 이름의 대/소문자를 무시하고 모듈에 정의된 명명된 형식을 가져옵니다.

public:
 override Type ^ GetType(System::String ^ className, bool ignoreCase);
public override Type GetType(string className, bool ignoreCase);
[System.Runtime.InteropServices.ComVisible(true)]
public override Type GetType(string className, bool ignoreCase);
override this.GetType : string * bool -> Type
[<System.Runtime.InteropServices.ComVisible(true)>]
override this.GetType : string * bool -> Type
Public Overrides Function GetType (className As String, ignoreCase As Boolean) As Type

매개 변수

className
String

가져올 이름입니다 Type .

ignoreCase
Boolean

이 경우 true검색은 대/소문자를 구분하지 않습니다. 이 경우 false검색은 대/소문자를 구분합니다.

반품

이 모듈에서 형식이 정의된 경우 요청된 형식입니다. 그렇지 않으면 . null

특성

예외

className 길이가 0이거나 1023보다 큽니다.

classNamenull입니다.

요청 Type 된 개체가 public이 아니고 호출자가 현재 어셈블리 외부에 공용이 아닌 개체를 반영할 필요가 ReflectionPermission 없습니다.

클래스 이니셜라이저가 호출되고 예외가 throw됩니다.

설명

이 메서드를 사용하여 배열 형식, 포인터 형식 또는 바이리프 형식을 생성하지 마세요. TypeBuilder.MakeArrayType대신 , TypeBuilder.MakePointerTypeTypeBuilder.MakeByRefType 메서드를 사용합니다.

적용 대상

GetType(String, Boolean, Boolean)

필요에 따라 형식 이름의 대/소문자를 무시하고 모듈에 정의된 명명된 형식을 가져옵니다. 필요에 따라 형식을 찾을 수 없는 경우 예외를 throw합니다.

public:
 override Type ^ GetType(System::String ^ className, bool throwOnError, bool ignoreCase);
public override Type GetType(string className, bool throwOnError, bool ignoreCase);
[System.Runtime.InteropServices.ComVisible(true)]
public override Type GetType(string className, bool throwOnError, bool ignoreCase);
override this.GetType : string * bool * bool -> Type
[<System.Runtime.InteropServices.ComVisible(true)>]
override this.GetType : string * bool * bool -> Type
Public Overrides Function GetType (className As String, throwOnError As Boolean, ignoreCase As Boolean) As Type

매개 변수

className
String

가져올 이름입니다 Type .

throwOnError
Boolean

true 형식을 찾을 수 없는 경우 예외를 throw하려면 입니다. false 를 반환 null합니다.

ignoreCase
Boolean

이 경우 true검색은 대/소문자를 구분하지 않습니다. 이 경우 false검색은 대/소문자를 구분합니다.

반품

이 모듈에서 형식이 선언된 경우 지정된 형식입니다. 그렇지 않으면 . null

특성

예외

className 길이가 0이거나 1023보다 큽니다.

classNamenull입니다.

요청 Type 된 개체가 public이 아니고 호출자가 현재 어셈블리 외부에 공용이 아닌 개체를 반영할 필요가 ReflectionPermission 없습니다.

클래스 이니셜라이저가 호출되고 예외가 throw됩니다.

throwOnErrortrue 고 지정된 형식을 찾을 수 없습니다.

설명

매개 변수는 throwOnError 형식을 찾을 수 없을 때 발생하는 동작에만 영향을 줍니다. throw될 수 있는 다른 예외에는 영향을 주지 않습니다. 특히 형식을 찾았지만 로드 TypeLoadException 할 수 없는 경우 있더라도 throwOnErrorfalsethrow할 수 있습니다.

이 메서드를 사용하여 배열 형식, 포인터 형식 또는 바이리프 형식을 생성하지 마세요. TypeBuilder.MakeArrayType대신 , TypeBuilder.MakePointerTypeTypeBuilder.MakeByRefType 메서드를 사용합니다.

적용 대상