Namespace: DeltaEngine.Tests.Datatypes
Assembly: DeltaEngine.Tests (in DeltaEngine.Tests.dll) Version: 1.1.1.0 (1.1.1)
Assembly: DeltaEngine.Tests (in DeltaEngine.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Examples
[Test] public void GetHashCodeViaDictionary() { var rect1 = new Rectangle(3, 4, 1, 2); var rect2 = new Rectangle(5, 6, 1, 2); var rectValues = new Dictionary<Rectangle, int> { { rect1, 1 }, { rect2, 2 } }; Assert.IsTrue(rectValues.ContainsKey(rect1)); Assert.IsTrue(rectValues.ContainsKey(rect2)); Assert.IsFalse(rectValues.ContainsKey(new Rectangle(3, 9, 1, 2))); }
See Also