using System.Collections.Generic;
public static void Main()
SortedList<int, string> planets = new SortedList<int, string>();
Console.WriteLine("-----Before update-----");
foreach(var planet in planets)
Console.WriteLine($"{planet.Key}, {planet.Value}");
planets[3] = "Earth - Updated";
Console.WriteLine("-----After update-----");
foreach(var planet in planets)
Console.WriteLine($"{planet.Key}, {planet.Value}");