C# Hashtable Values
Description
Hashtable Values
gets an ICollection containing the
values in the Hashtable.
Syntax
Hashtable.Values
has the following syntax.
public virtual ICollection Values { get; }
Example
using System;//from ww w . ja v a 2 s . c o m
using System.Collections;
class MainClass
{
public static void Main()
{
Hashtable hash = new Hashtable();
hash["A"] = "1";
foreach (string firstName in hash.Values)
{
Console.WriteLine(firstName);
}
}
}
The code above generates the following result.