_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.

注解

此方法用于访问托管类到从非托管代码,不应从托管代码调用。This method is for access to managed classes from unmanaged code, and should not be called from managed code.

GetType方法获取Type表示指定的类型的对象。The 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.

注解

此方法用于访问托管类到从非托管代码,不应从托管代码调用。This method is for access to managed classes from unmanaged code, and should not be called from managed code.

GetType方法获取Type具有指定名称的程序集实例,带有忽略大小写,和在找不到类型时引发异常的选项中的对象。The 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.

注解

此方法用于访问托管类到从非托管代码,不应从托管代码调用。This method is for access to managed classes from unmanaged code, and should not be called from managed code.

GetType方法获取Type对象具有指定名称的程序集实例中和 (可选) 如果找不到类型时引发异常。The 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.

注解

此方法用于访问托管类到从非托管代码,不应从托管代码调用。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.

注解

此方法用于访问托管类到从非托管代码,不应从托管代码调用。This method is for access to managed classes from unmanaged code, and should not be called from managed code.

GetType方法获取Type具有指定名称的程序集实例中的对象。The GetType method gets the Type object with the specified name in the assembly instance.

另请参阅

适用于