private static void Main() { var multiDictionary = new MultiDictionary <numberWithAttribute, StringBuilder>(); numberWithAttribute number; number.num = 1; multiDictionary.CreateNewValue(number); Display(multiDictionary); multiDictionary.Remove(number); Display(multiDictionary); Console.Read(); }
static void Main(string[] args) { MultiDictionary <FirstToDictionary, StringBuilder> dictionary = new MultiDictionary <FirstToDictionary, StringBuilder>(); FirstToDictionary first; first.number = 1; dictionary.CreateNewValue(first); foreach (var item in dictionary.Values) { Console.WriteLine($"{item}"); } Console.WriteLine(dictionary.Count()); }
static void Main(string[] args) { var multiDictionary = new MultiDictionary <IntEx, StringEx>(); multiDictionary.CreateNewValue(1); multiDictionary.Add(1, "one"); multiDictionary.Add(2, "two"); multiDictionary.Add(3, "three"); multiDictionary.Add(1, "ich"); multiDictionary.Add(2, "nee"); multiDictionary.Add(3, "sun"); //Good. It throws an exception var dictionary = new MultiDictionary <double, StringEx> { { 0.1, "bla" } }; PrintMultiDic(multiDictionary); Console.WriteLine("Press any key to continue..."); Console.ReadLine(); }