title: Instantiating nested class within static class
body: <p>I'm currently trying to manage the different REST-services I'm using in my project, which I have done by having one static class as a container class, followed up by several nested classes, like this:</p>
  
  <pre><code>public static class HostName {
      private const string HostAddress = "https://rest.connection.string/api"
      public class CourseQueryInformation{
          public CourseQueryInformation(string par, string par2)
          {
              ...
          }
      }
  
      public class PersonQueryInformation{
          public CourseQueryInformation(string par, string par2)
          {
              ...
          }
      }
  }
  </code></pre>
  
  <p>Now my main problem is that in order to instantiate a new object, I have to do the following:</p>
  
  <pre><code>var typeofobj = new HostName.CourseQueryInformation("par","parer");
  </code></pre>
  
  <p>This feels a bit messy.</p>
  
  <p>So, my main question is, is there any way to do this in a cleaner way? I would really like to keep the classes sorted within a container, but I'm uncertain if this is the best approach.</p>