在文件一开始:
[assembly: log4net.Config.DOMConfigurator(ConfigFile="betAomen.exe.log4net.xml", Watch=true)]
指定配置文件为:betAomen.exe.log4net.xml类里:
private readonly int limit = Int32.Parse(ConfigurationSettings.AppSettings["15Seconds"]);中的:
ConfigurationSettings.AppSettings["15Seconds"] 从配置文件中读取值,这跟WEB。CONFIG文件类似!!