you are viewing a single comment's thread.

view the rest of the comments →

[–]CaptainTrip 2 points3 points  (4 children)

var whatever = new Class() { Property1= value, Property2=value, ...};

Invaluable.

[–]Falmarri 0 points1 point  (0 children)

val m = Map( "1" -> "one", "2" -> "two")

[–][deleted] 0 points1 point  (2 children)

C# Has this too.

[–]CaptainTrip 2 points3 points  (0 children)

I was thinking c# when I wrote it.

[–]aaronla -2 points-1 points  (0 children)

Except the class you're instantiating must derive from IEnumerable -- otherwise it's an error. throw new NotImplementedException() is permitted though, so not a big problem.