@dheerajjoshim
hi
the code u sent is for the key and value that were in app.config file
but what i want to retrieve is....to retrieve key and value that are externally written using some writing into app.config file codes
just check the code below
System.Configur ation.Configura tion config = ConfigurationMa nager.OpenExeCo nfiguration(Con figurationUserL evel.None);
/* XmlDocument doc =
XmlNode node = doc.SelectSingl eNode("//appSettings");*/
string c = config.AppSetti ngs.Settings["secondname "].Value = "100";
//string k =Keys(config.Ap pSettings.Setti ngs["govinda"].Value) = "modifiedvalue" ;
//config.AppSetti ngs.Settings.Ad d("Modification Date", DateTime.Now.To LongTimeString( ) + " ");
//textBox2.Text = c;
string[] keys = appSettings.All Keys;
config.AppSetti ngs.Settings.Ad d("srinu","100" );
config.Save(Con figurationSaveM ode.Modified);
String myVal = System.Configur ation.Configura tionSettings.Ap pSettings["100"].ToString();
textBox1.Text = keys[1];
textBox2.Text = myVal;
here "keys" is an array having only 2 values means upto keys[1] it exists
but when i give textBox1.Text = keys[2];
it is showing error eventhough i have written another "srinu" key into config file