title: Declare a class or struct inside a method
body: <p>In C#, is it possible to declare a class or struct inside a method, as in C++?</p>
  
  <p>e.g. C++: </p>
  
  <pre><code>void Method()
  {
     class NewClass
     {
     } newClassObject;
  }
  </code></pre>
  
  <p>I have tried, but it's not allowing me to do so.      </p>