Consider this
var source = new{ Id = "1", Name = "Name1"}
It works fine. But if I want to add 1 more property how to do so…
It failed
var source = new{ Id = "1", Name = "Name1"},new{ Id = "1", Name = "Name1"}
what is the correct syntax for this?
See Collection initializers and anonymous types on MSDN: