title: Setting maximum event log size
body: <p>Why is the following code not working?</p>
  
  <pre><code>if(EventLog.Exists("Foo"))
  {
       EventLog.Delete("Foo");
  }
  
  if(EventLog.Exists("Foo") == false)
  {
       EventLog.CreateEventSource("Foo", "Foo");
  
       EventLog.GetEventLogs().First(x =&gt; x.Log == "Foo").ModifyOverflowPolicy(OverflowAction.OverwriteAsNeeded, 0);
       EventLog.GetEventLogs().First(x =&gt; x.Log == "Foo").MaximumKilobytes = 100000;
  }
  </code></pre>
  
  <p>The overflow policy is correctly being changed, but the maximum size stays at the default 512KB. What am I doing wrong?</p>
  
  <p>Thanks!</p>