create a data structure with the sorting properties that you want. Have a look at CollectionsUtil.CreateCaseInsensitiveSortedList or SortedList Constructor (IComparer).
To get a collection with comparison capabilities, it must be sorted. The bonus is, it will give you better performance because it can use a binary search instead of a linear search.
Unfortunately, this may not be incredibly useful in your situation. But... if you create your data structure first, you can then use databinding to fill your listbox or whatever. I'm going to bed now, so if you need more advice, ask again tomorrow, or email me, or wait for a more helpful UFie... |