title: C# - Global Program Object
body: <h3>Scenario</h3>
  <p>I have a non-static class that wraps around Log4Net. This is really handy as it links up to a further application I have that displays logs of different processes that occur in a variety of software that I write (to allow me to see where errors occur, batch processes fail etc.)</p>
  <h3>Problem</h3>
  <p>This is all well and good, but if I want to log an entire process, I have to do a series of things:</p>
  <ol>
  <li>Instantiate the Logging object.</li>
  <li>Tell it to begin.</li>
  <li>Log stuff.</li>
  <li>Tell it to stop.</li>
  </ol>
  <p>This means that if a process runs outside of the class I have to mess about passing the Logging object around which is a pain and looks messy.</p>
  <h3>Question</h3>
  <p>How can I essentially just declare the object in such a way that It is globally accessible by all the classes......and making it static isn't really an option, I don't think.</p>
  <p>.....This could be a waste of time but I like opinions.</p>