RuntimeReflectionExtensions.GetRuntimeField(Type, String) Method (System.Reflection) (original) (raw)

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

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

Parameters

type

Type

The type that contains the field.

name

String

The name of the field.

Returns

An object that represents the specified field, or null if the field is not found.

Exceptions

type is null.

-or-

name is null.

Applies to

See also