title: how to edit the nlog config file programmatically
body: <p>i am trying to edit the logging level in the config file programmaticly. </p>
  
  <pre><code> foreach (var rule in LogManager.Configuration.LoggingRules)
      {
  
  
                  if (m_loginglevelcomboBox.SelectedItem.ToString() == "Debug")
                  {
                      rule.EnableLoggingForLevel(LogLevel.Debug);
                  }
                  else
                  {
                      rule.EnableLoggingForLevel(LogLevel.Info);
  
                  }
       }
  
              //LogManager.ReconfigExistingLoggers();
  </code></pre>
  
  <p>I am not interested in calling the Reconfig,as the changes will affect the application on the fly. 
  I want the changes to be made when the application is restarted. so I need it to edit the config file.  </p>
  
  <p>i cant use xDocument ,as linq is not compatible with my .net version 
  so how can i edit the minlevel rule to debug/info ?</p>