StringExtensionsTests ConvertFloatToInvariantString Method Delta Engine Documentation

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

public void ConvertFloatToInvariantString()
Examples

[Test]
public void ConvertFloatToInvariantString()
{
    Assert.AreEqual("2.5", 2.5f.ToInvariantString());
    Assert.AreNotEqual("3.5", 1.5f.ToInvariantString());
    Assert.AreEqual("01", 1.0f.ToInvariantString("00"));
    Assert.AreEqual("1.23", 1.2345f.ToInvariantString("0.00"));
    Assert.AreNotEqual("1.2345", 1.2345f.ToInvariantString("0.00"));
    Assert.AreEqual("1", StringExtensions.ToInvariantString(1));
}
See Also