Comment Re:oh goody. (Score 2, Insightful) 499
Actually, with the latest incarnation of C#, it gets much more compact. I don't know how to get indentation to work within the ecode tag but you should still get the idea:
class foo
{
public int dontTouch { get; set; }
}
class bar
{
public void someMethod()
{
foo ourFoo = new foo() { dontTouch = 5 };
int asdf = ourFoo.dontTouch;
}
}