c# ignore case string equals code example Example: c# string equals ignore case string.Equals(val, "astringvalue", StringComparison.OrdinalIgnoreCase)