G
Guest
I have a situtation where CompareTo is returning strange results when having
dashes in strings. The most concise illustration is:
"10050".CompareTo("1005-") = 1
"10050".CompareTo("1005-0") = -1
I have run alot more tests (I can post a short program if useful), but the
rule seems to be - < 0 at the end of a string but - = 0 in the middle of a
string.
Does anybody know what's going on here?
dashes in strings. The most concise illustration is:
"10050".CompareTo("1005-") = 1
"10050".CompareTo("1005-0") = -1
I have run alot more tests (I can post a short program if useful), but the
rule seems to be - < 0 at the end of a string but - = 0 in the middle of a
string.
Does anybody know what's going on here?