FloatExtensionsToRoundtripString Method

Returns a culture-invariant String representation of the given Single value, from which the original value can be parsed without losing any information.

Definition

Namespace: KGySoft.CoreLibraries
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 8.1.0
C#
public static string ToRoundtripString(
	this float value
)

Parameters

value  Single
A Single value to be converted to String.

Return Value

String
A Single value, from which the original value can be parsed without losing any information.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Single. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Remarks

The result of this method can be parsed by Float.Parse; however, to retrieve exactly the original value, including a negative zero value, use the Parse String extension method instead.

See Also