Check out example codes for "C# check many strings quickly". It will help you in understanding the concepts better.
Code Example 1
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;
}
Learn ReactJs, React Native from akashmittal.com