Object Initializer, a new technique to initialize an object of a class or collection, was introduced in the .NET 3.5…