ValueSet ValueSet ValueSet ValueSet ValueSet Class


Implements a map with keys of type String and values of type Object. This class prevents non-serializable types from being put into the map.


Some members are only available for the specified language.

public : sealed class ValueSet : IPropertySet
struct winrt::Windows::Foundation::Collections::ValueSet : IPropertySet
public sealed class ValueSet : IPropertySet
Public NotInheritable Class ValueSet Implements IPropertySet
var valueSet = new valueSet();

Windows 10 requirements

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


Custom types must implement the IInspectable interface in order to be serializable.


ValueSet() ValueSet() ValueSet() ValueSet() ValueSet()

Creates and initializes a new instance of the property set.


Size Size Size Size Size

Gets the number of items contained in the value set.


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

Removes all items from the value set.

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

Returns an iterator to enumerate the items in the value set.

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

Gets an immutable view of the value set.

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

Indicates whether the value set has an item with the specified key.

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

Adds an item to the value set.

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

Retrieves the value for the specified key.

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

Removes an item from the value set.


MapChanged MapChanged MapChanged MapChanged MapChanged

Occurs when the observable map has changed.

See also