|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
SorteList Comparer: how to change it on the fly?Hi, I need to change at runtime the Comparer of a SortedList of mine
(it does not seem to expose a Comparer or Icomparer property). Do you know how can I do that (clearly without reconstructing the SL) ? Thanks -Tom Only way I can see is by either creating a new one (using the contstructor
that takes an IDictionary and an IComparer) or somehow change the IComparable implementation of the keys /claes <tommaso.gasta***@uniroma1.it> wrote in message Show quoteHide quote news:1153226801.907768.74660@75g2000cwc.googlegroups.com... > Hi, I need to change at runtime the Comparer of a SortedList of mine > (it does not seem to expose a Comparer or Icomparer property). > > Do you know how can I do that (clearly without reconstructing the SL) ? > > Thanks > > -Tom > Thank you Claes, I will go the second way you suggest.
Once I change the implementation, I may need to force a reordering of the existing list, for compare purpose - before adding or removing any item (which would force the reorder) - Can you see a meaningful way to force the reordering ? -Tommaso Claes Bergefall ha scritto: Show quoteHide quote > Only way I can see is by either creating a new one (using the contstructor > that takes an IDictionary and an IComparer) or somehow change the > IComparable implementation of the keys > > /claes > > <tommaso.gasta***@uniroma1.it> wrote in message > news:1153226801.907768.74660@75g2000cwc.googlegroups.com... > > Hi, I need to change at runtime the Comparer of a SortedList of mine > > (it does not seem to expose a Comparer or Icomparer property). > > > > Do you know how can I do that (clearly without reconstructing the SL) ? > > > > Thanks > > > > -Tom > >
GetFiles exception
Encrypt My.Settings setting? set up timer start 15 sec past minute lastLogonTimestamp Intermittent 'Out of memory' error Issue Tracker / Process (Project) Flow Management Organize Code Trying to use Cryptography Quickstart Access files from .NET Windows Service How to get client information? |
|||||||||||||||||||||||