Re: Sorting arrays of objects

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



"Dylan Parry" <usenet@xxxxxxxxxxxxxx> wrote in message news:glphcn.doo.1@xxxxxxxxxxxxxxxxx
Of course! I didn't think of that, and it's such a simple solution. Any
idea what would happen if, God forbid, there's an appendix called 10A? :s

If you implement my suggestion of "TryParse", the TryParse would return failure and you would then sort it alphabetically... which means that 10A would come *before* 9A. If this is not what you want, you will need to think about the possible combinations of numbers and letters that you allow in "number", and decide on how each combination shoud be sorted (for instance: if it starts with a number and then is followed by letters, sort numerically on the number part and the alphabetically on the rest of the string). You would need to specifically code for such criteria.

.



Relevant Pages

  • Re: Sorting arrays of objects
    ... Alberto Poblacion wrote: ... failure and you would then sort it alphabetically... ... if it starts with a number and then is followed by letters, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Sorting arrays of objects
    ... failure and you would then sort it alphabetically... ... if it starts with a number and then is followed by letters, ... public int CompareTo(object obj) { ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: I just dropped a letter in the mailbox
    ... I will be mailing them my census form. ... failure of some sort. ... the Census didn't have to mail two letters either. ...
    (rec.sport.football.college)
  • Re: sorting a textarea.
    ... to make a sorter who will read english words from the one tex area or ... letters or puntuation and sort these alphabetically. ... The name suggests that this compares alphabetically, ...
    (comp.lang.javascript)
  • Re: SMART Failure Predicted?
    ... | System: WinXP home, SP2 ... A failure may be imminent" ... Sort of like a cardiologist determining that a cardiac ... You can run the manufacturers diagnostic utility which may or may not ...
    (microsoft.public.windowsxp.help_and_support)