title: Anonymous Types in C#
body: <pre><code>// x is compiled as an int 
  var x = 10;
  
  // y is compiled as a string 
  var y = "Hello";
  
  // z is compiled as int[] 
  var z = new[] { 0, 1, 2 };
  </code></pre>
  
  <p>but </p>
  
  <pre><code>// ano is compiled as an anonymous type 
  var ano = new { x1 = 10, y1 = "Hello" };
  </code></pre>
  
  <p><code>ano</code> object's properties created are read-only . I want to figure it out why those properties are read only. suggestions are appreciated  ?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <pre><code>var ano1 = new { x1 = 10, y1 = "Hello" };
  
  var ano2 = new { x1 = 10, y1 = "Hello" };
  </code></pre>
  
  <p>Is that if the new anonymous type has the same number and type of properties in the same order will it be of the same internal type as the first ?</p>