Loop Each Item of HashTable - English training
class
Program
{
static
void
Main(
string
[] args)
{
Hashtable EmpHashTable =
new
Hashtable();
EmpHashTable.Add(
"Key1"
,
"Omer"
);
EmpHashTable.Add(
"Key2"
,
"Berke"
);
EmpHashTable.Add(
"Key3"
,
"Cebi"
);
string
str =
string
.Empty;
foreach
(DictionaryEntry HE
in
EmpHashTable)
{
str +=
", "
+ HE.Key +
" - "
+ HE.Value;
}
Console.Write(str);
Console.ReadLine();
}
}