How do I sort a List of Dictionaries based off of a value in a key within the Dictionary in C# .NET Silverlight? -


so have list of dictionary<string, string> dict , want sort list alphabetically off dict["title"] value.

how go doing that?

and, if want take value of dict["title"], modify string title = dict["title"] + "xyz";, , use modified title sorting value of dict (without changing dict["title"])...

how go doing well?

thanks.

linq it:

var dicts = new list<dictionary<string, string>>();  var sort = dicts.orderby(x => x.containskey("title") ? x["title"] : string.empty); var sort2 = dicts.orderby(x => x.containskey("title") ? x["title"] + "xyz" : string.empty); 

Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -