ValueSet ValueSet ValueSet ValueSet ValueSet Class

Definition

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.

Note

Some members are only available for the specified language.

public : sealed class ValueSet : IIterable<IKeyValuePair<Platform::String, Platform::Object>>, IMap<Platform::String, Platform::Object>, IObservableMap<Platform::String, Platform::Object>, IPropertySet
struct winrt::Windows::Foundation::Collections::ValueSet : IIterable<IKeyValuePair<Platform::String, Platform::Object>>, IMap<Platform::String, Platform::Object>, IObservableMap<Platform::String, Platform::Object>, IPropertySet
public sealed class ValueSet : IEnumerable<KeyValuePair<String, Object>>, IDictionary<String, Object>, IObservableMap<String, Object>, IPropertySet
Public NotInheritable Class ValueSet Implements IEnumerable<KeyValuePair<String, Object>>, IDictionary<String, Object>, IObservableMap<String, Object>, IPropertySet
var valueSet = new valueSet();
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.FoundationContract (introduced v1)

Remarks

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

Constructors

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

Creates and initializes a new instance of the property set.

Properties

Item[TKey] Item[TKey] Item[TKey] Item[TKey] Item[TKey]

Gets or sets the element with the specified key.

Keys Keys Keys Keys Keys

Gets an System.Collections.Generic.ICollection`1 containing the keys of the System.Collections.Generic.IDictionary`2.

Size Size Size Size Size

Gets the number of items contained in the value set.

Values Values Values Values Values

Gets an System.Collections.Generic.ICollection`1 containing the values in the System.Collections.Generic.IDictionary`2.

Methods

Add(TKey, TValue) Add(TKey, TValue) Add(TKey, TValue) Add(TKey, TValue) Add(TKey, TValue)

Adds an element with the provided key and value to the System.Collections.Generic.IDictionary`2.

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

Removes all items from the value set.

ContainsKey(TKey) ContainsKey(TKey) ContainsKey(TKey) ContainsKey(TKey) ContainsKey(TKey)

Determines whether the System.Collections.Generic.IDictionary`2 contains an element with the specified key.

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

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

GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

Returns an enumerator that iterates through the collection.

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(T) Remove(T) Remove(T) Remove(T) Remove(T)

Removes the element with the specified key from the System.Collections.Generic.IDictionary`2.

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

Removes an item from the value set.

TryGetValue(TKey, out TValue) TryGetValue(TKey, out TValue) TryGetValue(TKey, out TValue) TryGetValue(TKey, out TValue) TryGetValue(TKey, out TValue)

Gets the value associated with the specified key.

Events

MapChanged MapChanged MapChanged MapChanged MapChanged

Occurs when the observable map has changed.

See Also