RuntimeReflectionExtensions.GetRuntimeFields(Type) 方法

定義

擷取集合,表示指定的型別所定義的所有欄位。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IEnumerable<System::Reflection::FieldInfo ^> ^ GetRuntimeFields(Type ^ type);
public static System.Collections.Generic.IEnumerable<System.Reflection.FieldInfo> GetRuntimeFields (this Type type);
static member GetRuntimeFields : Type -> seq<System.Reflection.FieldInfo>
<Extension()>
Public Function GetRuntimeFields (type As Type) As IEnumerable(Of FieldInfo)

參數

type
Type

包含欄位的型別。

傳回

所指定型別的欄位集合。

例外狀況

typenull

備註

這個方法會傳回指定型別上定義的所有欄位,包括繼承、非公用、實例和靜態欄位。

適用於

另請參閱