RuntimeReflectionExtensions.GetRuntimeFields(Type) 方法

定義

擷取集合,表示指定的型別所定義的所有欄位。Retrieves a collection that represents all the fields defined on a specified 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>

參數

type
Type

包含欄位的型別。The type that contains the fields.

傳回

所指定型別的欄位集合。A collection of fields for the specified type.

例外狀況

typenulltype is null.

備註

這個方法會傳回在指定類型上定義的所有欄位, 包括繼承的、非公用、實例和靜態欄位。This method returns all fields that are defined on the specified type, including inherited, non-public, instance, and static fields.

適用於

另請參閱