Friday, April 28, 2017

Key Value pair to store and read value using Dictionary in C#

// Declare Dictionary  variable as shown below
 var ListLeadTimeDate = new Dictionary<string, string>();

//Add value against any key



 ListLeadTimeDate.Add("1", "hello");

//Retrieve it using below code

 string Reqstr = ListLeadTimeDate["1"];

No comments:

Post a Comment