Dictionary<int,string> dict_names = new Dictionary<int,string>();
dict_names.Add("n]ame","rajesh");
dict_names.Add("surname","sathua");
1st way:-
int value1 = dict_names["name"]; //output will be rajesh
int value2 = dict_names["surname"]; //output will be sathua
2nd way:-
foreach(KeyValuePair<int,string> pair in dict_names)
{
Response.Write(pair.Key + ":" + pair.Value);
}