public void CanFindOutIfContainsAKey() { WeakRefDictionary<object, object> dict = new WeakRefDictionary<object, object>(); dict.Add("foo", null); Assert.IsTrue(dict.ContainsKey("foo")); Assert.IsFalse(dict.ContainsKey("foo2")); }