simona a

simona a

  • NA
  • 5
  • 0

Sorting dictionary object

Jan 23 2009 1:10 AM

Hi,

I've a dictionary object:

Dictionary<string, string[]> dictCompanies = new Dictionary<string, string[]>();

How do sort this object on its key?

I tried using OrderBy like below, but it does no seem to work

dictCompanies .OrderByDescending(c=> c.Key);

I'm binding this dictionary object to a checkboxlist in aspx page.

I tried sorting this ListItemCollection using delegate...but still no luck...

Am i missing something here?

Thanks

 


Answers (1)