RuntimeReflectionExtensions.GetRuntimeProperty(Type, String) Metodo

Definizione

Recupera un oggetto che rappresenta una proprietà specificata.

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

Parametri

type
Type

Tipo che contiene la proprietà .

name
String

Nome della proprietà.

Valori restituiti

Oggetto che rappresenta la proprietà specificata o null se la proprietà non viene trovata.

Eccezioni

type è null.

oppure

name è null.

type non è un oggetto RuntimeType.

È stata trovata più di una proprietà con il nome richiesto.

Si applica a

Vedi anche