Share via


ValueSet.Insert(String, Object) Method

Definition

Adds an item to the value set.

public:
 virtual bool Insert(Platform::String ^ key, Platform::Object ^ value) = IMap<Platform::String ^, Platform::Object ^>::Insert;
bool Insert(winrt::hstring const& key, IInspectable const& value);
public bool Insert(string key, object value);
function insert(key, value)
Public Function Insert (key As String, value As Object) As Boolean

Parameters

key
String

Platform::String

winrt::hstring

The key to insert.

value
Object

Platform::Object

IInspectable

The value to insert.

Returns

Boolean

bool

True if the method replaces a value that already exists for the key; false if this is a new key.

Implements

Remarks

Some functionality in this class is restricted to specific development languages. The parent topic, ValueSet class, indicates which members are accessible in specific languages. For functionality similar to this member, see Add(String,Object).

Applies to

See also