DoubleExtensionsToRoundtripString Method

Returns a culture-invariant String representation of the given Double 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 double value
)

Parameters

value  Double
A Double value to be converted to String.

Return Value

String
A Double 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 Double. 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 Double.Parse; however, to retrieve exactly the original value, including a negative zero value, use the Parse String extension method instead.

See Also