Vector2D 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.Vector2DTests
Examples

1 unit tests call DeltaEngine.Datatypes.Vector2D.GetHashCode
[Test]
public void GetHashCodeViaDictionary()
{
    var vector2DValues = new Dictionary<Vector2D, int> { { v1, 1 }, { v2, 2 } };
    Assert.IsTrue(vector2DValues.ContainsKey(v1));
    Assert.IsTrue(vector2DValues.ContainsKey(v2));
    Assert.IsFalse(vector2DValues.ContainsKey(new Vector2D(5, 6)));
}
See Also