Windows Dev Center

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.

Syntax


var valueSet = new Windows.Foundation.Collections.ValueSet();

Attributes

[DualApiPartition()]
[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06030000)]

Members

The ValueSet class has these types of members:

Constructors

The ValueSet class has these constructors.

ConstructorDescription
ValueSet Creates and initializes a new instance of the property set.

 

Events

The ValueSet class has these events.

EventDescription
MapChanged Occurs when the observable map has changed.

 

Methods

The ValueSet class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

MethodDescription
Add(KeyValuePair) [C#, VB]Adds a new key-value pair to the ValueSet.
Add(String) [C#, VB]Adds an item to the ValueSet.
Clear Removes all items from the value set.
Contains [C#, VB]Returns a value that indicates whether a specified key-value pair exists in the ValueSet.
ContainsKey [C#, VB]Returns a value that indicates whether a specified key exists in the ValueSet.
CopyTo [C#, VB]Copies the elements of the collection to an array, starting at a particular array index.
First [C++, JavaScript]Returns an iterator to enumerate the items in the value set.
GetView [C++, JavaScript]Gets an immutable view of the value set.
HasKey [C++, JavaScript]Indicates whether the value set has an item with the specified key.
Insert [C++, JavaScript]Adds an item to the value set.
Lookup [C++, JavaScript]Retrieves the value for the specified key.
Remove [C++, JavaScript]Removes an item from the value set.
Remove(KeyValuePair) [C#, VB]Removes a specific key-value pair from the ValueSet.
Remove(String) [C#, VB]Removes a specific item from the ValueSet.
TryGetValue [C#, VB]Returns a value that indicates whether a specified key exists in the ValueSet. If an item with that key exists, the item is retrieved as an out parameter.

 

Properties

The ValueSet class has these properties.

PropertyAccess typeDescription

Count [C#, VB]

Read-onlyGets the number of elements contained in the collection.

IsReadOnly [C#, VB]

Read-onlyGets a value indicating whether the dictionary is read-only.

Item [C#, VB]

Read/writeGets or sets the element value at the specified key index.

Keys [C#, VB]

Read-onlyGets an ICollection object containing the keys of the ValueSet.

Size [C++, JavaScript]

Read-onlyGets the number of items contained in the value set.

Values [C#, VB]

Read-onlyGets an ICollection object containing the values of the ValueSet.

 

Requirements (device family)

Device family

Universal

API contract

Windows.Foundation.FoundationContract, introduced version 1.0

Namespace

Windows.Foundation.Collections
Windows::Foundation::Collections [C++]

Metadata

Windows.Foundation.FoundationContract.winmd

Requirements (operating system)

Minimum supported client

None supported [Windows Store apps, desktop apps]

Minimum supported server

None supported [Windows Store apps, desktop apps]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Foundation.Collections
Windows::Foundation::Collections [C++]

Metadata

Windows.winmd

See also

Object
IPropertySet
IObservableMap(String, Object)
IMap(String, Object)
IIterable(IKeyValuePair)

 

 

Show:
© 2015 Microsoft