|
-
Jul 10th, 2004, 06:09 AM
#1
Thread Starter
Member
Sorting a Collection
I am having a problem with a Collection. I have created a card class that holds the number (1-13) and a suit (C, D, H, S). I then have created a collection that holds 5 card objects. What I am attempting to do is sort the collection by card.number from lowest to highest.
Ex: 3H, 9C, 2D, 5S, 3C
To
2D, 3H, 3C, 5S, 9C
I have tried using multidimentional arrays, and collections. I would like to use something along the lines I use with a single dimensional array:
Array.Sort(myArray)
Unfortunatly this method dosent work with collections or multidimentional arrays. If you have a solution on how I should approach this I would really appreciat it.
-Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|