title: Declaring an anonymous type member with a simple name
body: <p>When you try to compile this:</p>
  
  <pre><code>var car = new { "toyota", 5000 };
  </code></pre>
  
  <p>You will get the compiler error <em>"Invalid anonymous type member declarator. Anonymous type members must be declared with a member assignment, simple name or member access."</em> because the compiler is not able to infer the name of the properties from the respective expressions. <strong>That makes total sense.</strong></p>
  
  <p>What makes me curious is that the error message implies three valid ways to declare a type member. Member assignment and member access are obvious:</p>
  
  <pre><code>// member assignment
  var v = new { Amount = 108, Message = "Hello" };
  
  // member access
  var productQuery = 
      from prod in products
      select new { prod.Color, prod.Price };
  </code></pre>
  
  <p>What would be an example of declaring with a <em>simple name</em>? </p>
  
  <p>Googling and the related questions on SO result in examples of <em>member assignment</em> and <em>member access</em> only.</p>