Type.GenericTypeArguments 屬性

定義

取得此類型之泛型類型引數的陣列。

public:
 abstract property cli::array <Type ^> ^ GenericTypeArguments { cli::array <Type ^> ^ get(); };
public:
 virtual property cli::array <Type ^> ^ GenericTypeArguments { cli::array <Type ^> ^ get(); };
public abstract Type[] GenericTypeArguments { get; }
public virtual Type[] GenericTypeArguments { get; }
member this.GenericTypeArguments : Type[]
Public MustOverride ReadOnly Property GenericTypeArguments As Type()
Public Overridable ReadOnly Property GenericTypeArguments As Type()

屬性值

Type[]

這個類型之泛型型別引數的陣列。

備註

此屬性只會取得泛型型別引數;也就是說,針對目前型別的泛型型別參數所指定的型別。 如果目前類型是泛型型別定義,這個屬性會傳回空陣列。

注意

如果在泛型方法或其他泛型型別中使用泛型型別,部分泛型型別引數可能是封入方法或型別的泛型型別參數。

若要取得代表泛型型別定義的型別泛型型別參數,請使用 TypeInfo.GenericTypeParameters 屬性。 若要取得 TypeInfo 目前 Type 物件的 物件,請使用 IntrospectionExtensions.GetTypeInfo 擴充方法。

適用於