using System.Collections.Generic;
public static void Main()
var dict = new Dictionary<string, int>(StringComparer.OrdinalIgnoreCase);
Console.WriteLine("The dictionary<string, int> contains the following KeyValuePairs:");
foreach (KeyValuePair<string, int> item in dict)
Console.WriteLine($"Key: {item.Key} Value: {item.Value}");
Console.WriteLine("\nBEGIN 'Dictionary<string, int>(StringComparer.OrdinalIgnoreCase)' test---\n");
Console.WriteLine("\nCase-Insenstive results:\n-------------------------\n");
if (dict.ContainsKey("A")) { Console.WriteLine("Dictionary contains key 'A' = true"); }
if (dict.ContainsKey("b")) { Console.WriteLine("Dictionary contains key 'b' = true"); }
if (dict.ContainsKey("C")) { Console.WriteLine("Dictionary contains key 'C' = true"); }
if (dict.ContainsKey("tEst")) { Console.WriteLine("Dictionary contains key 'TEST' = true"); }
Console.WriteLine("\nEND 'Dictionary<string, int>(StringComparer.OrdinalIgnoreCase)' test---");