Insert method
Collapse the table of content
Expand the table of content

IMap<K, V>.Insert method

Inserts or replaces an item in the map.

Syntax


bool Insert(
  K^ key, 
  V^ value
)

Parameters

key

Type: K

The key associated with the item to insert.

value

Type: V

The item to insert.

Return value

Type: Boolean

True if an item with the specified key is an existing item that was replaced; otherwise, false.

Remarks

When programming with .NET, this interface is hidden and developers should use the System.Collections.Generic.IDictionary<TKey,TValue> interface.

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.FoundationContract, introduced version 1.0

Namespace

Windows::Foundation::Collections

Metadata

Windows.Foundation.FoundationContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8

Namespace

Windows::Foundation::Collections

Metadata

Windows.winmd

See also

IMap<K, V>

 

 

Show:
© 2016 Microsoft