IPropertyValueGetter.TryGetPropertyValue Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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:
bool TryGetPropertyValue(System::String ^ propertyName, System::Object ^ value, [Runtime::InteropServices::Out] System::Object ^ % propertyValue);
bool TryGetPropertyValue(std::wstring const & propertyName, winrt::Windows::Foundation::IInspectable const & value, [Runtime::InteropServices::Out] winrt::Windows::Foundation::IInspectable const & & propertyValue);
public bool TryGetPropertyValue (string propertyName, object value, out object propertyValue);
abstract member TryGetPropertyValue : string * obj * obj -> bool
Public 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
.
Applies to
TryGetPropertyValue<T>(String, Object, T)
Gets the value of the specified property on the specified object.
public:
generic <typename T>
bool TryGetPropertyValue(System::String ^ propertyName, System::Object ^ value, [Runtime::InteropServices::Out] T % propertyValue);
public:
generic <typename T>
bool TryGetPropertyValue(Platform::String ^ propertyName, Platform::Object ^ value, [Runtime::InteropServices::Out] T & propertyValue);
template <typename T>
bool TryGetPropertyValue(std::wstring const & propertyName, winrt::Windows::Foundation::IInspectable const & value, [Runtime::InteropServices::Out] T & propertyValue);
public bool TryGetPropertyValue<T> (string propertyName, object value, out T propertyValue);
abstract member TryGetPropertyValue : string * obj * 'T -> bool
Public 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
.