PropertyValueGetter.TryGetPropertyValue Method

Definition

Overloads

TryGetPropertyValue(String, Object, Object)

Gets the value of the specified property on the specified object.

TryGetPropertyValue<T>(String, Object, T)

Gets the value of the specified property on the specified object.

TryGetPropertyValue(String, Object, Object)

Gets the value of the specified property on the specified object.

public:
 virtual bool TryGetPropertyValue(System::String ^ propertyName, System::Object ^ value, [Runtime::InteropServices::Out] System::Object ^ % propertyValue);
 virtual bool TryGetPropertyValue(std::wstring const & propertyName, winrt::Windows::Foundation::IInspectable const & value, [Runtime::InteropServices::Out] winrt::Windows::Foundation::IInspectable const & & propertyValue);
public virtual bool TryGetPropertyValue (string propertyName, object value, out object propertyValue);
abstract member TryGetPropertyValue : string * obj * obj -> bool
override this.TryGetPropertyValue : string * obj * obj -> bool
Public Overridable Function TryGetPropertyValue (propertyName As String, value As Object, ByRef propertyValue As Object) As Boolean

Parameters

propertyName
String

The name of the property to get the value for.

value
Object

The object to get value from.

propertyValue
Object

The value of the property.

Returns

true if the property value could be retrieved; otherwise, false.

Implements

Applies to

TryGetPropertyValue<T>(String, Object, T)

Gets the value of the specified property on the specified object.

public:
generic <typename T>
 virtual bool TryGetPropertyValue(System::String ^ propertyName, System::Object ^ value, [Runtime::InteropServices::Out] T % propertyValue);
public:
generic <typename T>
 virtual bool TryGetPropertyValue(Platform::String ^ propertyName, Platform::Object ^ value, [Runtime::InteropServices::Out] T &  propertyValue);
template <typename T>
 virtual bool TryGetPropertyValue(std::wstring const & propertyName, winrt::Windows::Foundation::IInspectable const & value, [Runtime::InteropServices::Out] T & propertyValue);
public virtual bool TryGetPropertyValue<T> (string propertyName, object value, out T propertyValue);
abstract member TryGetPropertyValue : string * obj * 'T -> bool
override this.TryGetPropertyValue : string * obj * 'T -> bool
Public Overridable Function TryGetPropertyValue(Of T) (propertyName As String, value As Object, ByRef propertyValue As T) As Boolean

Type Parameters

T

The type of the property value.

Parameters

propertyName
String

The name of the property to get the value for.

value
Object

The object to get value from.

propertyValue
T

The value of the property if it exists; otherwise, default(T).

Returns

true if the property value of the specified type could be retrieved; otherwise, false.

Implements

Applies to