Question:

Explain Anonymous type in C#?

Answer:

This is being added in C# 3.0 version. This feature enables us to create an object at compile time. Below is the sample code for the same –

Var myTestCategory = new { CategoryId = 1, CategoryName = “Category1”};

Keywords:

© 2017 QuizBucket.org