SortedList.RemoveAt : SortedList « System.Collections « C# / C Sharp by API






SortedList.RemoveAt

  
using System;
using System.Collections;


public class MainClass {
    public static void Main() {
        SortedList list = new SortedList();
        list.Add("G", "B");
        list.Add("Ae", "Sm");
        list.Add("Ay", "G");
        list.Add("Ab", "S");
        list.Add("W", "C");

        list.Remove("Abraxus");
        list.RemoveAt(2);

        String artist = (string)list["Ay"];
        Console.WriteLine(artist);

        String error = (string)list["S"];
        Console.WriteLine(error);

        foreach (DictionaryEntry d in list) {
            Console.WriteLine("{0}, {1}", d.Key, d.Value);
        }
    }
}

   
    
  








Related examples in the same category

1.SortedList.Add
2.SortedList.ContainsValue()
3.SortedList.Count
4.SortedList.GetByIndex
5.SortedList.GetKey
6.SortedList.GetKeyList
7.SortedList.GetValueList
8.SortedList.IndexOfKey
9.SortedList.Keys
10.SortedList.Remove
11.SortedList.Values