TypeInfo.GetDeclaredProperty(String) Метод

Определение

Возвращает объект, представляющий указанное свойство, объявленное текущим типом.

public:
 virtual System::Reflection::PropertyInfo ^ GetDeclaredProperty(System::String ^ name);
public virtual System.Reflection.PropertyInfo GetDeclaredProperty(string name);
[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicProperties | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)]
public virtual System.Reflection.PropertyInfo? GetDeclaredProperty(string name);
public virtual System.Reflection.PropertyInfo? GetDeclaredProperty(string name);
abstract member GetDeclaredProperty : string -> System.Reflection.PropertyInfo
override this.GetDeclaredProperty : string -> System.Reflection.PropertyInfo
[<System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicProperties | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)>]
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

Название свойства.

Возвращаемое значение

Объект, представляющий указанное свойство, если он найден; nullв противном случае .

Атрибуты

Исключения

name равно null.

Применяется к