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.

适用于

另请参阅