RuntimeReflectionExtensions.GetRuntimeProperty(Type, String) 方法

定义

检索表示指定属性的对象。

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

参数

type
Type

包含该属性的类型。

name
String

属性的名称。

返回

表示指定属性的对象,若未找到该属性则为 null

例外

typenull

- 或 -

namenull

type 不是 RuntimeType

已找到名称所请求名称一致的多个属性。

适用于

另请参阅