static void Main(string[] args) { Random rand = new Random(); DictionaryCommon <PlacesV, PlacesV> Dic = new DictionaryCommon <PlacesV, PlacesV>(); for (int i = 0; i < 5000; i++) { Thread.Sleep(50); Dic.Add(PlacesV.RandAdd(rand), PlacesV.RandAdd(rand)); } TestCollection Collections = new TestCollection(Dic); Console.Read(); }
public TestCollection(DictionaryCommon <PlacesV, PlacesV> tempColl) { Dic = tempColl; for (int i = 0; i < tempColl.Count; i++) { DictionaryCommon <PlacesV, PlacesV> .Point t = tempColl[i]; Dic1.Add(t.Key.ToString(), t.Value); Lis.Add(t.Key); Lis1.Add(t.Key.ToString()); } First = Dic[0].Clone(); Mid = Dic[Dic.Count / 2].Clone(); End = Dic[Dic.Count - 1].Clone(); Search(Lis, Lis1, Dic, Dic1, swatch, First); Search(Lis, Lis1, Dic, Dic1, swatch, Mid); Search(Lis, Lis1, Dic, Dic1, swatch, End); Search(Lis, Lis1, Dic, Dic1, swatch, No); }