What are anonymous types?

 Posted by Gopesh9 on 8/24/2012 | Category: ASP.NET Interview questions | Views: 2589 | Points: 40
Answer:

Annymous types are Data types that are Declared by the compiler, rather than trough the explicit class definition.

var n = { number = 10, message = "hi"};

Console.WriteLine(n.number + n.message);


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Posted by: Vijusah2010 on: 9/27/2012 | Points: 10
var n =new { number = 10, message = "hi"};
Console.WriteLine(n.number + n.message);

Login to post response