System::Collections::Generic::SortedList
But i wrote hell a lot of code using this. Now i don't want the list to be sorted.
So can I change the this SortedList to some other type of same kind.
For example Dictionary or IDictionary can be used in similar way.
Similar to these types i want some other of this kind except Dictionary.
VulpesPosted Jun 22, 2012, 10:25 AM
Karthik AgarwalPosted Jun 22, 2012, 10:09 AM
But how should i be accessing Keys and values from the same.
VulpesPosted Jun 22, 2012, 9:58 AM
You could create a separate list of the keys (use franges->Keys instead of Values) which, initially, would be in the same order as the corresponding values. However, if you deleted items or inserted new ones, then you'd need to make corresponding changes to both lists to keep them synchronized.
Of course, if you go for my original suggestion, then the keys are still there as part of the KeyValuePairs within the List.
Karthik AgarwalPosted Jun 22, 2012, 9:48 AM
Previously i was doing like franges->Keys[ranges_index] looks like i will not be able to do the same here.
VulpesPosted Jun 22, 2012, 9:27 AM
If you don't want the keys, then you can create a List
List
Karthik AgarwalPosted Jun 22, 2012, 9:09 AM
I want to remove whole of SortedList and add some thing newly of its kind.
But your declaration shows something which is franges which is a sortedlist.
Or else if there is some thing which can make the sorted list unsorted is also fine.
VulpesPosted Jun 22, 2012, 8:58 AM