C# StringDictionary Values
Description
StringDictionary Values
gets a collection of values
in the StringDictionary.
Syntax
StringDictionary.Values
has the following syntax.
public virtual ICollection Values { get; }
Example
using System;//from w w w .j a v a 2 s . c om
using System.Collections;
using System.Collections.Specialized;
public class SamplesStringDictionary
{
public static void Main()
{
StringDictionary myCol = new StringDictionary();
myCol.Add( "red", "rojo" );
myCol.Add( "green", "verde" );
myCol.Add( "blue", "azul" );
foreach (string val in myCol.Values)
{
Console.WriteLine(val);
}
}
}
The code above generates the following result.