In pseudo-code:
Split this into alpha and numeric components.
Split "Other" into alpha and numeric components.
int retval = thisAlpha.CompareTo(otherAlpha)
if retval <0 return retval
return int.parse(thisNumeric).compareto(int.parse(otherNu meric))
Basically, what you are doing is comparing the alpha parts first and if they
are equal, converting the numeric parts to integers and comparing them.
Mike.
"Ethan Strauss" <ethan dot strauss at Promega dot comwrote in message
news:O1**************@TK2MSFTNGP03.phx.gbl...
Hi,
I want to be able to create a custom sort order for a Sorted List.
Specifically, I have a grid which goes from A1 to H12. The default sort
gives me A10, A11, A1, A2 ... I would like to change it so that it first
sorts by the alphabetical character and then the number. I have figured
out that I need to use IComparer, but I can't figure how to set up
IComparer. Can anyone help?
Thanks!
Ethan