Represents an associative collection.
.NET: This interface appears as System.Collections.Generic.IDictionary<K,V>.
Syntax
generic<typename K, typename V> public interface class IMap : IIterable<IKeyValuePair>
Attributes
- GuidAttribute("3c2925fe-8519-45c1-aa79-197b6718c1c1")
- VersionAttribute(NTDDI_WIN8)
Type parameters
- K
-
The type of the keys in the map.
- V
-
The type of the values in the map.
Members
The IMap interface inherits from IIterable(IKeyValuePair). IMap also has these types of members:
Methods
The IMap interface has these methods. It also inherits methods from the Object class.
| Method | Description |
|---|---|
| Clear | Removes all items from the map. |
| GetView | Returns an immutable view of the map. |
| HasKey | Determines whether the map contains the specified key. |
| Insert | Inserts or replaces an item in the map. |
| Lookup | Returns the item at the specified key in the map. |
| Remove | Removes an item from the map. |
Properties
The IMap interface has these properties.
| Property | Access type | Description |
|---|---|---|
| Read-only | Gets the number of items in the map. |
Remarks
When building Windows Store apps with the Microsoft .NET Framework, this interface is hidden and developers should use the System.Collections.Generic.IDictionary<K,V> interface.
The IMap<K,V> interface represents a collection of key-value pairs where a value can be accessed by its associated key. Properties and methods of IMap<K,V> support dictionary-type functionality, such as getting the size of the collection, and adding and removing items at specified locations in the collection. Additionally, the GetView method provides a snapshot of the map whose observable state does not change. The snapshot is useful when you need a view of the collection to refer to in subsequent operations that involve IMap<K,V>.
Requirements
|
Minimum supported client | Windows 8 |
|---|---|
|
Minimum supported server | Windows Server 2012 |
|
Minimum supported phone | Windows Phone 8 |
|
Namespace |
Windows::Foundation::Collections |
|
Metadata |
|
|
DLL |
|
Build date: 2/25/2013