Editare

Partajați prin


RuntimeReflectionExtensions.GetRuntimeField(Type, String) Method

Definition

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