using System; using System.Collections.Generic; using System.Text; using System.Collections.Specialized; using System.Configuration; namespace ConsoleApplication2 { class Program { staticvoid Main(string[] args) { try { NameValueCollection ns = (NameValueCollection)ConfigurationManager.GetSection("mySectionGroup/mySection"); string s = ns["key1"]; int n = Convert.ToInt32(ns["key2"]); Console.WriteLine(s +", "+ n.ToString()); } finally { Console.Read(); } } } }