Declaration of Anonymous types List [duplicate]

How about dynamic?

List<dynamic> dynamicList = new List<dynamic>();


dynamicList.Add(new { Name = "Krishna",  Phones = new[] { "555-555-5555", "666-666-6666" } }); 

Leave a Comment