title: Why are the properties of anonymous types in C# read-only?
body: <p>In C#, the properties of anonymous types are read-only:</p>
  
  <pre><code>var person = new { Surname = "Smith", OtherNames = "John" };
  person.Surname = "Johnson";  // ERROR: .Surname is read-only
  </code></pre>
  
  <p>Of course I can declare a real class if I want writable fields or properties, but regardless, what is the reasoning behind this design decision to make the properties read-only?</p>