RuntimeReflectionExtensions.GetRuntimeProperty(Type, String) Metoda

Definicja

Pobiera obiekt reprezentujący określoną właściwość.

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);
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

Parametry

type
Type

Typ, który zawiera właściwość.

name
String

Nazwa właściwości.

Zwraca

Obiekt reprezentujący określoną właściwość lub null jeśli właściwość nie zostanie znaleziona.

Wyjątki

type to null.

-lub-

name to null.

type nie jest elementem RuntimeType.

Odnaleziono więcej niż jedną właściwość o żądanej nazwie.

Dotyczy

Zobacz też