var dictionary = new MultiDictionary<int key1, int key2, string value>(); Task[] tasks = new Task[2]; tasks[0] = Task.Run(() => { for (int i = 0; i < 2; i++) { dictionary.Add(i,i+1, "value: "+i); } }); tasks[1] = Task.Run(() => { for (int i = 2; i < data.Length; i++) { if (dictionary.ContainsKeys(i,i+1) Console.WriteLine("Value is:"dictionary.GetValue(i,i+1)); else Console.WriteLine(No value); } }); Task.WaitAll(tasks);
Dictionary
MultiDictionary
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)