RuntimeReflectionExtensions.GetRuntimeField(Type, String) Metoda

Definice

Načte objekt, který představuje určené pole.Retrieves an object that represents a specified field.

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

Parametry

type
Type

Typ, který obsahuje pole.The type that contains the field.

name
String

Název poleThe name of the field.

Návraty

FieldInfo

Objekt, který představuje zadané pole, nebo null Pokud pole není nalezeno.An object that represents the specified field, or null if the field is not found.

Výjimky

type je null.type is null.

-nebo--or-

name je null.name is null.

Platí pro

Viz také