Vector2DTests PointToString 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 PointToString()
Examples

[Test]
public void PointToString()
{
    Assert.AreEqual("3, 4", new Vector2D(3, 4).ToString());
}
[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