public void ToArray() { StringStringPair[] array = _dictionary.ToArray(); Assert.AreEqual(_dictionary.Count, array.Length); for (int i = 0; i < _dictionary.Count; i++) { Assert.IsTrue(_dictionary.Contains(array[i])); } }