ExpandoObject - No Property Initialization?

I was just trying out this piece of code:

dynamic expando = new ExpandoObject( ) {
  FirstName = "Oliver",
  Name = "Sturm"

This doesn’t work! Not sure whether that’s intended (this is VS 2010 beta 2, in case you’re wondering), but it really seems like a feature that should work… of course, if you’re not familiar with the ExpandoObject, this piece of code does work:

dynamic expando = new ExpandoObject( );
expando.FirstName = "Oliver";
expando.Name = "Sturm";

Any insights? Or I’ll have to brave the volume of that mailing list…

Sorry, this blog does not support comments.

I used various blog hosting services since this blog was established in 2005, but unfortunately they turned out to be unreliable in the long term and comment threads were lost in unavoidable transitions. At this time I don't want to enable third-party services for comments since it has become obvious in recent years that these providers invariably monetize information about their visitors and users.

Please use the links in the page footer to get in touch with me. I'm available for conversations on Keybase, Matrix, Mastodon or Twitter, as well as via email.