Friday, January 9, 2009

Dictionary Object

use below header to invoke Dictionary
using System.Collections.Generic;

Dictionary myvalue = new Dictionary();
myvalue.Add("First Name","VIJAY");
myvalue.Add("Second Name","ANANDH");
foreach (KeyValuePair value in myvalue)
{
if (value.Key == "First Name")
{
Response.Write(value.Value.ToString());
}
}

No comments: