Tag: object initializer

Object and Collection Initializer in C#

The Object Initializer and Collection Initializer are similar to initialized Array and Object Constructor where we are able to set the properties of the newly created objects or multiple instances of the new object in …

Anonymous Types in C#

This was introduced in C# 3.0. Anonymous types are on the fly classes or unnamed classes. For example i define a class with the following :