Wednesday, July 21, 2010

Eample for using Dictionary and Keyvalue pair

Dictionary templateFields = new Dictionary();
templateFields.Add("Key1", "Value1");
templateFields.Add("Key2", "Value2");
templateFields.Add("Key3", "Value3");

foreach (KeyValuePair indexPair in templateFields)
{
StringBuilder bodyMessage = new StringBuilder
if(indexPair.Value=="Value1")
bodyMessage = bodyMessage.Replace(indexPair.Key, indexPair.Value);
}

No comments:

Post a Comment