public void Remove(object value)
        {
            MySortedDictionary <K, T> ms = new MySortedDictionary <K, T>(sl);
            int index = ms.IndexOfValue(value);
            K   key   = ms.GetKey(index);

            sl.Remove(key);
        }
        public MySortedDictionary <K, T> Clone()
        {
            Console.WriteLine("Клонируем словарь");
            MySortedDictionary <K, T> clone = new MySortedDictionary <K, T>(sl)
            {
                Capacity = Capacity
            };

            Console.WriteLine("Клонирование завершено");
            Console.WriteLine();
            return(clone);
        }
 public void SetByIndex(int index, object value)
 {
     if (index > Count - 1)
     {
         Console.WriteLine();
         Console.WriteLine("Ключа с таким индексом нет в словаре", Console.ForegroundColor = ConsoleColor.Red);
         Console.ResetColor();
     }
     else
     {
         MySortedDictionary <K, T> ms = new MySortedDictionary <K, T>(sl);
         K key = ms.GetKey(index);
         sl.RemoveAt(index);
         sl.Add(key, (T)value);
     }
 }