using
System;
using
System.Collections;
using
System.Collections.Specialized;
class
GFG {
public
static
void
Main()
{
OrderedDictionary myDict =
new
OrderedDictionary();
myDict.Add(
"key1"
,
"value1"
);
myDict.Add(
"key2"
,
"value2"
);
myDict.Add(
"key3"
,
"value3"
);
myDict.Add(
"key4"
,
"value4"
);
myDict.Add(
"key5"
,
"value5"
);
ICollection valueCollection = myDict.Values;
String[] myValues =
new
String[myDict.Count];
valueCollection.CopyTo(myValues, 0);
for
(
int
i = 0; i < myDict.Count; i++) {
Console.WriteLine(myValues[i]);
}
}
}