次の方法で共有


PropertyCollection.AddProperty(Object, Object) Method

Definition

Adds a new property to the collection.

public:
 void AddProperty(System::Object ^ key, System::Object ^ property);
public:
 void AddProperty(Platform::Object ^ key, Platform::Object ^ property);
void AddProperty(winrt::Windows::Foundation::IInspectable const & key, winrt::Windows::Foundation::IInspectable const & property);
public void AddProperty (object key, object property);
member this.AddProperty : obj * obj -> unit
Public Sub AddProperty (key As Object, property As Object)

Parameters

key
Object

The key by which the property can be retrieved. Must be non-null.

property
Object

The property to associate with the key.

Exceptions

An element with the same key already exists in the PropertyCollection.

key is null.

Applies to