Vector2DTests PointToStringAndFromString Method Delta Engine Documentation

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

public void PointToStringAndFromString()
Examples

[Test]
public void PointToStringAndFromString()
{
    var v = new Vector2D(2.23f, 3.45f);
    string pointString = v.ToString();
    Assert.AreEqual(v, new Vector2D(pointString));
    Assert.Throws<Vector2D.InvalidNumberOfComponents>(() => new Vector2D("0.0"));
}
See Also