HashTable clone method - 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;
Hashtable myShallowCopyObject = (Hashtable)EmpHashTable.Clone();
foreach
(DictionaryEntry Temp
in
myShallowCopyObject)
{
str +=
", "
+ Temp.Key +
" - "
+ Temp.Value;
}
Console.WriteLine(str);
Console.ReadLine();
}
}