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.

適用於