Tag: comparison

Case insensitive string comparison for Contains in C#

When using the string.contains method , the comparison is done based on the exact string that is passed as parameter. In this case , the comparison is case-sensitive. using System; namespace ACConsoleApp { class Program { static void Main(string[] args) { string input = “This is a WeLcome string”; var output = input.Contains(“Welcome”); Console.WriteLine(output); Console.ReadLine(); } } } In the above code snippet , the…