Size ToString Method Delta Engine Documentation

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

public override string ToString()

Return Value

Type: String
Remarks

Tests: DeltaEngine.Tests.Datatypes.SizeTests
Examples

2 unit tests call DeltaEngine.Datatypes.Size.ToString
[Test]
public void SizeToString()
{
    var testSize = new Size(2.23f, 3.45f);
    Assert.AreEqual("2.23, 3.45", testSize.ToString());
    Assert.AreEqual(testSize, new Size(testSize.ToString()));
}
[Test]
public void SizeToStringAndFromString()
{
    var s = new Size(2.23f, 3.45f);
    string sizeString = s.ToString();
    Assert.AreEqual(s, new Size(sizeString));
}
See Also