Saturday, August 20, 2011

a different way to new up

Foo foo = new Foo{ Bar = "baz", Qux = true };

 
 

...is not unlike...

Foo foo = new Foo();

foo.Bar = "baz";

foo.Qux = true;

No comments:

Post a Comment