I need to return an IEnumerable of a dynamically created Dictionary.
pseudo code:
var x = from u in Users
select new dictionary<string, string>{
Add("Name",u.Name),
Add("LastName",u.LastName)
}
I've been trying many ways to get the pseudo code example above but no success...
I would really appreciate your help.
var x = from u in Users
select new Dictionary<string, string> {
{ "Name", u.Name },
{ "LastName", u.LastName }
};
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With