logo       

Moving object order in a collection in C#: msg#00042

Subject: Moving object order in a collection in C#
I've got an object that has a set of sub-objects.  I want to be able to 
retrieve the sub-objects in a certain order.  Is there a way to change 
the index of the sub-objects?

E.G:
Favorites:
Cars:
 1. Corvette
 2. Nova
 3. Firebird

User wants to change the order so that it reads:
 1. Corvette
 2. Firebird
 3. Nova

Currently I'm tracking the order with an Order int field, but this 
seems really messy and error prone.  Any ideas?




------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12hgarkmj/M=362329.6886308.7839368.1510227/D=groups/S=1705007709:TM/Y=YAHOO/EXP=1124822257/A=2894321/R=0/SIG=11dvsfulr/*http://youthnoise.com/page.php?page_id=1992
">Fair play? Video games influencing politics. Click and talk back!</a>.</font>
--------------------------------------------------------------------~-> 

 


<Prev in Thread] Current Thread [Next in Thread>