Wednesday, October 22, 2014

Dynamic type construction

You don't have the dynamic keyword or ExpandoObject but you can still dynamically create objects using the var keyword in .NET 3.5. So this code will work:



var example = new { Id = 1, Name = "test1"};


No comments:

Post a Comment