C
C# Learner
I want to compare two strings, in a numeric fashion.
e.g.:
string a = "10";
string b = "2";
int comparison = String.Compare(a, b);
// comparison is now <0, but I want it to be >0 in this case
// since 10 is more than 2, numerically
Is this possible, without having to write my own comparison method?
I can't find an answer anywhere.
e.g.:
string a = "10";
string b = "2";
int comparison = String.Compare(a, b);
// comparison is now <0, but I want it to be >0 in this case
// since 10 is more than 2, numerically
Is this possible, without having to write my own comparison method?
I can't find an answer anywhere.