in C Sharp by
Explain Anonymous type in C#?

► Click here to show 1 Answer

0 votes
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”};
Learn More with Madanswer

Related questions

0 votes
asked Jun 16, 2020 in C Sharp by Hodge