In .NET < 3.5 the only collections you could initialize inline were arrays. So this was legal:
However if you wanted to have List instead of array, you had to use a trick and pass array as constructor parameter:
Not the most elegant piece of code, but at least it works. So far so good. What if you wanted to have a IDictionary instead of ICollection? Well… in this case you’re out of luck, at least partially. To have a dictionary initialized, you’d have to use explicit static constructor, and it means – performance hit. Still, it’s better than nothing.
But this all was in medieval times. Now, with object and collection initializers you can initialize any ICollection, the way you could with Arrays.
This is neat, but even better stuff, is that you can do similar thing with Dictionaries, which means, no explicit static constructor required anymore.