conatins ignore case c# code example Example: C# how to ignore case if (val.Equals("astringvalue", StringComparison.InvariantCultureIgnoreCase))