_Assembly.GetType _Assembly.GetType _Assembly.GetType _Assembly.GetType Method

定義

為 COM 物件提供與版本無關的 GetType 方法之存取權。Provides COM objects with version-independent access to the GetType methods.

多載

GetType(String, Boolean, Boolean) GetType(String, Boolean, Boolean) GetType(String, Boolean, Boolean) GetType(String, Boolean, Boolean)

為 COM 物件提供與版本無關的 GetType(String, Boolean, Boolean) 方法之存取權。Provides COM objects with version-independent access to the GetType(String, Boolean, Boolean) method.

GetType(String, Boolean) GetType(String, Boolean) GetType(String, Boolean) GetType(String, Boolean)

為 COM 物件提供與版本無關的 GetType(String, Boolean) 方法之存取權。Provides COM objects with version-independent access to the GetType(String, Boolean) method.

GetType() GetType() GetType() GetType()

為 COM 物件提供與版本無關的 GetType() 方法之存取權。Provides COM objects with version-independent access to the GetType() method.

GetType(String) GetType(String) GetType(String) GetType(String)

為 COM 物件提供與版本無關的 GetType(String) 方法之存取權。Provides COM objects with version-independent access to the GetType(String) method.

備註

這個方法是用來從非受控程式碼存取 managed 類別, 而且不應該從 managed 程式碼呼叫。This method is for access to managed classes from unmanaged code, and should not be called from managed code.

方法會取得代表指定類型的物件。Type GetTypeThe GetType methods get the Type object that represents the specified type.

GetType(String, Boolean, Boolean) GetType(String, Boolean, Boolean) GetType(String, Boolean, Boolean) GetType(String, Boolean, Boolean)

為 COM 物件提供與版本無關的 GetType(String, Boolean, Boolean) 方法之存取權。Provides COM objects with version-independent access to the GetType(String, Boolean, Boolean) method.

public:
 Type ^ GetType(System::String ^ name, bool throwOnError, bool ignoreCase);
public Type GetType (string name, bool throwOnError, bool ignoreCase);
abstract member GetType : string * bool * bool -> Type
Public Function GetType (name As String, throwOnError As Boolean, ignoreCase As Boolean) As Type

參數

name
String String String String

類型的完整名稱。The full name of the type.

throwOnError
Boolean Boolean Boolean Boolean

true 表示找不到該類型時擲回例外狀況,false 則表示傳回 nulltrue to throw an exception if the type is not found; false to return null.

ignoreCase
Boolean Boolean Boolean Boolean

若要忽略類型名稱的大小寫,則為 true,否則為 falsetrue to ignore the case of the type name; otherwise, false.

傳回

表示指定類別的 Type 物件。A Type object that represents the specified class.

備註

這個方法是用來從非受控程式碼存取 managed 類別, 而且不應該從 managed 程式碼呼叫。This method is for access to managed classes from unmanaged code, and should not be called from managed code.

方法會取得具有元件實例中指定之名稱的物件、忽略大小寫的選項,以及在找不到該類型時擲回例外狀況的。Type GetTypeThe GetType method gets the Type object with the specified name in the assembly instance, with the options of ignoring the case, and of throwing an exception if the type is not found.

另請參閱

GetType(String, Boolean) GetType(String, Boolean) GetType(String, Boolean) GetType(String, Boolean)

為 COM 物件提供與版本無關的 GetType(String, Boolean) 方法之存取權。Provides COM objects with version-independent access to the GetType(String, Boolean) method.

public:
 Type ^ GetType(System::String ^ name, bool throwOnError);
public Type GetType (string name, bool throwOnError);
abstract member GetType : string * bool -> Type
Public Function GetType (name As String, throwOnError As Boolean) As Type

參數

name
String String String String

類型的完整名稱。The full name of the type.

throwOnError
Boolean Boolean Boolean Boolean

true 表示找不到該類型時擲回例外狀況,false 則表示傳回 nulltrue to throw an exception if the type is not found; false to return null.

傳回

表示指定類別的 Type 物件。A Type object that represents the specified class.

備註

這個方法是用來從非受控程式碼存取 managed 類別, 而且不應該從 managed 程式碼呼叫。This method is for access to managed classes from unmanaged code, and should not be called from managed code.

方法會取得元件實例中具有指定名稱的物件,並在找不到類型時選擇性地擲回例外狀況。Type GetTypeThe GetType method gets the Type object with the specified name in the assembly instance and optionally throws an exception if the type is not found.

另請參閱

GetType() GetType() GetType() GetType()

為 COM 物件提供與版本無關的 GetType() 方法之存取權。Provides COM objects with version-independent access to the GetType() method.

public:
 Type ^ GetType();
public Type GetType ();
abstract member GetType : unit -> Type
Public Function GetType () As Type

傳回

Type 物件。A Type object.

備註

這個方法是用來從非受控程式碼存取 managed 類別, 而且不應該從 managed 程式碼呼叫。This method is for access to managed classes from unmanaged code, and should not be called from managed code.

GetType方法會取得目前實例的類型。The GetType method gets the type of the current instance.

另請參閱

GetType(String) GetType(String) GetType(String) GetType(String)

為 COM 物件提供與版本無關的 GetType(String) 方法之存取權。Provides COM objects with version-independent access to the GetType(String) method.

public:
 Type ^ GetType(System::String ^ name);
public Type GetType (string name);
abstract member GetType : string -> Type
Public Function GetType (name As String) As Type

參數

name
String String String String

類型的完整名稱。The full name of the type.

傳回

Type 物件,表示指定的類別;如果找不到類別,則為 nullA Type object that represents the specified class, or null if the class is not found.

備註

這個方法是用來從非受控程式碼存取 managed 類別, 而且不應該從 managed 程式碼呼叫。This method is for access to managed classes from unmanaged code, and should not be called from managed code.

方法會取得元件實例中具有指定名稱的物件。Type GetTypeThe GetType method gets the Type object with the specified name in the assembly instance.

另請參閱

適用於