There are a number of ways to compare strings. Are there performance gains by doing one way over another?
I\'ve always opted to compare strings like so:
If the equality operator actually performed worse than CompareTo - wouldn't Microsoft make the implementation of the equality operator call CompareTo?
CompareTo
Just use the equality operator to test for equality.