This property is used to get a collection containing the values in the Dictionary<TKey,TValue>.
Syntax:
public System.Collections.Generic.Dictionary<TKey, TValue>.KeyCollection Values{ get; }
Return Value: This property returns a collection containing the Values in the Dictionary.
Below are the programs to illustrate the use of
Dictionary<TKey,TValue>.Values Property:
Example 1:
Output:
Total key/value pairs in myDict are : 6
Value = Canberra
Value = Brussels
Value = Amsterdam
Value = Beijing
Value = Moscow
Value = New Delhi
Example 2: