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

適用於

另請參閱