using System;
using System.Collections.Generic;
public class Program
{
public static void Main()
SortedList<int, string> planets = new SortedList<int, string> {
{ 1, "Mercury" },
{ 2, "Venus" },
{ 3, "Earth" }
};
Console.WriteLine(planets.IndexOfKey(3)); //Returns 2
}