c# - Dictionary with single key multiple values in a list -


i have linq query want put in dictionary. dictionary is

dictionary<string, list<string>> 

how can put query below defined dictionary?

... ... select new    {      b.propertyname                   a.propertyvalue,      a.propertyorder,    }).distinct().todictionary(x => x.propertyname,      x => x.tolist() // rest of 2 values should in list     ); 

select new { b.propertyname a.propertyvalue, a.propertyorder}) .distinct() .todictionary(key => key.propertyname,  value => new list<string>{ value.propertyvalue, value.propertyorder}); 

Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

c# - two queries in same method -