ValueSet class

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.

Note  Some members are only available for the specified language.
 

Syntax


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

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-only

Gets the number of elements contained in the collection.

IsReadOnly [C#, VB]

Read-only

Gets a value indicating whether the dictionary is read-only.

Item [C#, VB]

Read/write

Gets or sets the element value at the specified key index.

Keys [C#, VB]

Read-only

Gets an ICollection object containing the keys of the ValueSet.

Size [C++, JavaScript]

Read-only

Gets the number of items contained in the value set.

Values [C#, VB]

Read-only

Gets an ICollection object containing the values of the ValueSet.

 

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.FoundationContract, introduced version 1.0

Namespace

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

Metadata

Windows.Foundation.FoundationContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

None supported

Minimum supported server

None supported

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

Attributes

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

See also

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

 

 

Show:
© 2017 Microsoft