GenericTypeParameterBuilder.GetElementType 方法

定义

在所有情况下均引发 NotSupportedException

public:
 override Type ^ GetElementType();
public override Type GetElementType ();
override this.GetElementType : unit -> Type
Public Overrides Function GetElementType () As Type

返回

由当前数组类型引用的类型、指针类型,或 ByRef 类型;如果当前类型不是数组类型,那么 null 不是指针类型,且不能通过引用传递。

例外

在所有情况下。

注解

泛型类型参数是类型的占位符。 由于无法提前知道该类型,因此无法知道它是否具有元素类型或该元素类型可能是什么。 任何返回值都会具有误导性,因此该方法会 NotSupportedException引发 。

适用于