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…

1 Comment on ExpandoObject – no property initialization?

  1. Gerade getestet, geht leider auch im RC nicht.

    Like

Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s