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

mysql - FireDac error 314 - but DLLs are in program directory -

git - How to list all releases of public repository with GitHub API V3 -

c++ - Getting C2512 "no default constructor" for `ClassA` error on the first parentheses of constructor for `ClassB`? -