title: How to initialize struct members, when struct is defined within a class?
body: <p>Using c# I would like to set the variables within a struct which is a member of a class, from within that class. Pretty new to c#. Help appreciated.</p>
  
  <pre><code>class myclass
  {
     public struct mystruct
     {
         public int something;
     }
  
     public void init() 
     {
        mystruct.something = 20; // &lt;-- this is an error
     }
  
     static void Main(string[] args)
     {
         myclass c = new myclass();
         c.init();          
     }
  }
  </code></pre>
  
  <p>Error: 'An object reference is required for the non-static field, method, or property myclass.mystruct.something'</p>