title: C# Custom alias of dictionary of structs
body: <p>(Apologies, this is basically my first C# program, and I'm translating C++)</p>
  
  <p>I defined a "user" struct like this:</p>
  
  <pre><code>struct user
  {
    string usrnm;
    string pw;
  }
  </code></pre>
  
  <p>It is said <a href="https://stackoverflow.com/questions/161477/equivalent-of-typedef-in-c-sharp">here</a> that one can create a pseudo typedef in C#</p>
  
  <pre><code>namespace _1._0
  {
    class Program
    {
      struct user
      {
        string usrnm;
        string pw;
      }
      using (userArr = Dictionary&lt;int, user&gt;);
    }
  }
  </code></pre>
  
  <p>But this doesn't work; it throws me the error saying:</p>
  
  <p><code>Invalid token 'using' in class, struct or interface member declaration</code></p>
  
  <p>and</p>
  
  <p><code>The type or namespace name 'userArr' could not be found (are you missing a using directive or assembly reference?)</code></p>
  
  <p>So why doesn't this work, and how can I get it to work?</p>