I want to check whether string below contains top/ TOP/toP/ Top/TOp/ Top in c#. My code is like
string str = null;
str = "CSharp Top11111 10 BOOKS";
if (str.Contains("top") == true)
{
Console.WriteLine("The string Contains() 'TOP' ");
}
else
{
Console.WriteLine("The String does not Contains() 'TOP'");
}
But it return true only when my string contain 'top'. How can return true for all other scenarios too? I know this may be simple, but I searched a Lot didn't find any solutions