I experienced a very strange issue with dictionary. To my understanding, dictionary always preserve insertion order. If I try to add previously removed key again, it is getting added at the top instead of getting added at the end. Is it a known bug?
Dictionary<char, int> dic = new Dictionary<char, int>();
dic.Add('b', 1);
dic.Add('c', 1);
dic.Add('a', 1);
dic.Remove('b');
dic.Add('b', 1); // b is getting added at index 0