We all know that when we create an anonymous class like this:
var Employee = new { ID = 5, Name= \"Prashant\" };
...at run time it will be of t
public class Employee { public int ID { get; set; } public string Name { get; set; } }
Then use the following syntax
var employee = new Employee { ID = 5, Name = "Prashant" };