RuntimeReflectionExtensions.GetRuntimeField(Type, String) 方法

定义

检索表示指定字段的对象。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Reflection::FieldInfo ^ GetRuntimeField(Type ^ type, System::String ^ name);
public static System.Reflection.FieldInfo GetRuntimeField (this Type type, string name);
public static System.Reflection.FieldInfo? GetRuntimeField (this Type type, string name);
static member GetRuntimeField : Type * string -> System.Reflection.FieldInfo
<Extension()>
Public Function GetRuntimeField (type As Type, name As String) As FieldInfo

参数

type
Type

包含字段的类型。

name
String

字段的名称。

返回

FieldInfo

表示指定字段的对象,若未找到该字段则为 null

例外

typenull

  • 或 -

namenull

适用于

另请参阅