Comparing two strings

  • Thread starter Thread starter Vycka
  • Start date Start date
V

Vycka

A simple question:
How to compare two strings finding out which one should go first
alphabetically?
In other words is there a function that would told us which string of two
strings should stand first in alphabet?

I hope you understand my problem.

I'm working with VS.NET C#

Thank you
 
Or more "logically" (does the same thing really):

string1 > string2
or
string1 < string2

-mdb
 
* mdb said:
Or more "logically" (does the same thing really):

string1 > string2
or
string1 < string2

VB.NET doesn't support operator overloading, thus this code doesn't
work.
 
(e-mail address removed) (Herfried K. Wagner [MVP]) wrote in (e-mail address removed):
VB.NET doesn't support operator overloading, thus this code doesn't
work.

Hrmph. <disparaging comments withheld.>

Anyway, the guy said he was using C#. Even so I feel like a moron since
that isn't default in C# either. I must have reverted to an infantile
stage of my life when < and > would compare strings like you would think.

-mdb
 
Back
Top