Answers for "C# check many strings quickly"

C#
0

C# check many strings quickly

isDifferent = false;
if (stringsWeAreComparingAgainst[x].Length != stringsWeWantToSeeIfMatches[x].Length)
{
    isDifferent = true;
    continue;
}
else
{
    for (int y = 0; y < stringsWeWantToSeeIfMatches[x].Length; y++)
    {
        if (char.ToUpperInvariant(stringsWeWantToSeeIfMatches[x][y]) != char.ToUpperInvariant(stringsWeAreComparingAgainst[x][y]))
        {
            isDifferent = true;
            break;
        }
    }
    if (!isDifferent)
        numberOfMatches += 1;
}
Posted by: Guest on April-23-2020

C# Answers by Framework

Browse Popular Code Answers by Language