StringMap StringMap StringMap StringMap StringMap Class

Definition

An associative collection, also known as a map or a dictionary.

public : sealed class StringMap
struct winrt::Windows::Foundation::Collections::StringMap
public sealed class StringMap
Public NotInheritable Class StringMap
var stringMap = new stringMap();
Attributes

Windows 10 requirements

Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.FoundationContract (introduced v1)

Remarks

This class allows JavaScript to easily iterate over a collection for which strings are the only expected value for both keys and values.

Constructors

StringMap() StringMap() StringMap() StringMap() StringMap()

Creates and initializes a new instance of the StringMap.

Properties

Size Size Size Size Size

Gets the number of items in the map.

Methods

Clear() Clear() Clear() Clear() Clear()

Removes all items from the map.

First() First() First() First() First()

Returns an iterator containing the items in the collection.

GetView() GetView() GetView() GetView() GetView()

Returns an immutable view of the map.

HasKey(String) HasKey(String) HasKey(String) HasKey(String) HasKey(String)

Determines whether the map contains the specified key.

Insert(String, String) Insert(String, String) Insert(String, String) Insert(String, String) Insert(String, String)

Inserts or replaces an item in the map.

Lookup(String) Lookup(String) Lookup(String) Lookup(String) Lookup(String)

Returns the item at the specified key in the map.

Remove(String) Remove(String) Remove(String) Remove(String) Remove(String)

Removes an item from the map.

Events

MapChanged MapChanged MapChanged MapChanged MapChanged

Occurs when the contents of the map change.

See also