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

找到具有请求名称的多个属性。

适用于

另请参阅