0 Comments

If you want to compare two string, ignoring case, use string.Compare and not string.ToLower, for performance reasons.

if (string.Compare(stringA, stringA, true) == 0)
{
    // Strings are equal (case ignored)

}

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Related Posts