Partilhar via


PropertyCollection.GetProperty Method

Definition

Overloads

GetProperty(Object)

Gets the property associated with the specified key.

GetProperty<TProperty>(Object)

Gets the property associated with the specified key.

GetProperty(Object)

Gets the property associated with the specified key.

public:
 System::Object ^ GetProperty(System::Object ^ key);
public:
 Platform::Object ^ GetProperty(Platform::Object ^ key);
winrt::Windows::Foundation::IInspectable GetProperty(winrt::Windows::Foundation::IInspectable const & key);
public object GetProperty (object key);
member this.GetProperty : obj -> obj
Public Function GetProperty (key As Object) As Object

Parameters

key
Object

The key.

Returns

The property value, or null if the property is not set.

Exceptions

key is null.

key does not exist in the property collection.

Applies to

GetProperty<TProperty>(Object)

Gets the property associated with the specified key.

public:
generic <typename TProperty>
 TProperty GetProperty(System::Object ^ key);
public:
generic <typename TProperty>
 TProperty GetProperty(Platform::Object ^ key);
template <typename TProperty>
 TProperty GetProperty(winrt::Windows::Foundation::IInspectable const & key);
public TProperty GetProperty<TProperty> (object key);
member this.GetProperty : obj -> 'Property
Public Function GetProperty(Of TProperty) (key As Object) As TProperty

Type Parameters

TProperty

The type of the property.

Parameters

key
Object

The key.

Returns

TProperty

The property value, or null if the property is not set.

Exceptions

key is null.

key does not exist in the property collection.

Applies to