i need to compare two strings in C# by using ascii... for example
^^^ should be greater than ZZZ
and zzz should be greater than both of those...
string.compare
and compareto don't work
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
AlanPosted Sep 29, 2008, 5:36 AM
Try using:
String.Compare(str1,str2, StringComparison.Ordinal)
http://msdn.microsoft.com/en-us/library/e6883c06.aspx