Posts in June 2014

← Archive

Fun with Custom C# Collection Initializers

The collection initializer syntax of C# is a clean way to initialize a collection with values. The compiler will insert appropriate method calls which actually add those items. We can leverage the convention-based nature of this process to provide our custom collection initializers.

← Archive