title: C# Structs: Unassigned local variable?
body: <p>From the <a href="http://msdn.microsoft.com/en-us/library/saxz13w4.aspx" rel="noreferrer">documentation</a>:</p>
  
  <blockquote>
    <p>Unlike classes, structs can be instantiated without using a new operator.</p>
  </blockquote>
  
  <p>So why am I getting this error:</p>
  
  <blockquote>
    <p>Use of unassigned local variable 'x'</p>
  </blockquote>
  
  <p>When I try to do this?</p>
  
  <pre><code>        Vec2 x;
          x.X = det * (a22 * b.X - a12 * b.Y);
          x.Y = det * (a11 * b.Y - a21 * b.X);
  </code></pre>
  
  <p>Where <code>Vec2 x</code> is a struct?</p>