Mike Taulty's Blog
Bits and Bytes from Microsoft UK
Anonymous Types & Read-Only Properties

Blogs

Mike Taulty's Blog

Elsewhere

I hadn't noticed this before;

    static void Main(string[] args)
    {
      var v = new { Prop1 = "A", Prop2 = "B" };

      v.Prop1 = "Foo";
    }

 

Here's the error;

image


Posted Wed, Oct 17 2007 1:55 AM by mtaulty
Filed under: ,

Comments

Loic Bar - Analyste programmeur wrote Type anonyme en Read-Only
on Wed, Oct 17 2007 2:12 PM
Type anonyme en Read-Only