Hi everyone!

I was wondering if anybody knew how to compare to strings in C#. I know in java you use CompareTo, but how and what do you use in C#?

Thanks,
C++ :mrgreen:

I figured it out - the CompareTo method

Thanks :mad: :evil: :mad:

Cool. Thread marked as solved.

I know this thread has been marked solved, but for anyone else wondering the same thing; you could also use the == operator. It's been overloaded in C#, so it works just fine ;)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.