TypeInfo.GetDeclaredProperty(String) 方法

定义

返回表示由当前类型声明的指定公共属性的对象。Returns an object that represents the specified public property declared by the current type.

public:
 virtual System::Reflection::PropertyInfo ^ GetDeclaredProperty(System::String ^ name);
public virtual System.Reflection.PropertyInfo GetDeclaredProperty (string name);
abstract member GetDeclaredProperty : string -> System.Reflection.PropertyInfo
override this.GetDeclaredProperty : string -> System.Reflection.PropertyInfo
Public Overridable Function GetDeclaredProperty (name As String) As PropertyInfo

参数

name
String

属性的名称。The name of the property.

返回

如果找到对象,则为表示指定的属性的对象;否则为 nullAn object that represents the specified property, if found; otherwise, null.

异常

namenullname is null.

适用于