Monday, September 26, 2016

You may skip the empty curly braces when newing up a list in C# if you like.

var buckToothedTreeGnawers = new List<Beaver>();

...and...

 
 

var buckToothedTreeGnawers = new List<Beaver>() { };

...are basically the same thing.

No comments:

Post a Comment