AppDomain appDomain = AppDomain.CurrentDomain; Configuration config = ConfigurationManager.OpenExeConfiguration(Path.Combine(appDomain.BaseDirectory, "XXX.dll")); XXX= int.Parse(config.AppSettings.Settings["XXX"].Value); XXX= int.Parse(config.AppSettings.Settings["XXX"].Value); XXX= int.Parse(config.AppSettings.Settings["XXX"].Value); XXX= int.Parse(config.AppSettings.Settings["XXX"].Value);