Creating a list from a dictionary : IDictionary « Data Structure « C# / CSharp Tutorial






using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text;

public class MainClass
{
    public static void Main()
    {
        IDictionary<string, DateTime> dictionary = new Dictionary<string, DateTime>();
        List<KeyValuePair<string, DateTime>> keyValueList = new List<KeyValuePair<string, DateTime>>(dictionary);
    }
}








11.30.IDictionary
11.30.1.IDictionary: Add some entries into the dictionary
11.30.2.IDictionary: remove one entry
11.30.3.IDictionary: Check whether certain keys exist in the map
11.30.4.IDictionary: Retrieve some values from the map
11.30.5.IDictionary: iterate over the map and add up the values
11.30.6.IDictionary: Iterating over map/value pairs
11.30.7.Creating a list from a dictionary