G
garyhoran
Hi Guys,
I have a collection that contains various attributes (stuff like
strings, DateTime and Timespan) . I would like to access the collection
in various orders at different points in the application ie sometimes I
want to cycle through the values in the collection in DateTime order
while at other times in TimeSpan order.
Ideally I would like multiple keys - such as Timespan within DateTime
order but maybe that is asking too much.
Also some of the keys I would like to use are not unique.
So I guess I have three questions
1. Whats the best way of sorting a collection in general
2. Is there anyway to sort with multiple keys
3. Is there any way to do sorts with non-unique keys
Would really appreciate any info you guys could give me.
Regards,
Gary
I have a collection that contains various attributes (stuff like
strings, DateTime and Timespan) . I would like to access the collection
in various orders at different points in the application ie sometimes I
want to cycle through the values in the collection in DateTime order
while at other times in TimeSpan order.
Ideally I would like multiple keys - such as Timespan within DateTime
order but maybe that is asking too much.
Also some of the keys I would like to use are not unique.
So I guess I have three questions
1. Whats the best way of sorting a collection in general
2. Is there anyway to sort with multiple keys
3. Is there any way to do sorts with non-unique keys
Would really appreciate any info you guys could give me.
Regards,
Gary