Size GetHashCode Method Delta Engine Documentation

Namespace: DeltaEngine.Datatypes
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public override int GetHashCode()

Return Value

Type: Int32
Remarks

Tests: DeltaEngine.Tests.Datatypes.SizeTests
Examples

1 unit tests call DeltaEngine.Datatypes.Size.GetHashCode
[Test]
public void GetHashCodeViaDictionary()
{
    var first = new Size(1, 2);
    var second = new Size(3, 4);
    var sizeValues = new Dictionary<Size, int> { { first, 1 }, { second, 2 } };
    Assert.IsTrue(sizeValues.ContainsKey(first));
    Assert.IsTrue(sizeValues.ContainsKey(second));
    Assert.IsFalse(sizeValues.ContainsKey(new Size(5, 6)));
}
See Also