_Type.GetElementType _Type.GetElementType _Type.GetElementType _Type.GetElementType Method

定义

为 COM 对象提供对 GetElementType() 方法的与版本无关的访问。Provides COM objects with version-independent access to the GetElementType() method.

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

返回

当前数组、指针或引用类型包含的或引用的对象的 TypeThe Type of the object encompassed or referred to by the current array, pointer or reference type.

- 或 --or- 如果当前 Type 不是数组或指针,或者不是通过引用传递的,或者表示泛型类型,或者表示泛型类型或方法定义的类型参数,则为 nullnull if the current Type is not an array or a pointer, or is not passed by reference, or represents a generic type or a type parameter of a generic type or method definition.

注解

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

Type.GetElementType 方法Type返回当前数组、指针或引用类型包含的或引用的对象的。The Type.GetElementType method returns the Type of the object encompassed or referred to by the current array, pointer or reference type.

适用于