KeyValuePairIn the above example, we have created two key-value pairs – one with a key of 1 and a value of "John", and the other with a key of 2 and a value of "Jane". We then output the key and value of each pair to the console using the `Console.WriteLine` method. KeyValuePair is part of the System.Collections.Generic namespace in C#, which is a library of generic collection classes and interfaces.pair1 = new KeyValuePair (1, "John"); KeyValuePair pair2 = new KeyValuePair (2, "Jane"); Console.WriteLine(pair1.Key + " " + pair1.Value); // outputs "1 John" Console.WriteLine(pair2.Key + " " + pair2.Value); // outputs "2 Jane"