C# Convert ToString(Single)
Description
Convert ToString(Single)
converts the value of the specified
single-precision floating-point number to its equivalent string representation.
Syntax
Convert.ToString(Single)
has the following syntax.
public static string ToString(
float value
)
Parameters
Convert.ToString(Single)
has the following parameters.
value
- The single-precision floating-point number to convert.
Returns
Convert.ToString(Single)
method returns The string representation of value.
Example
/* w w w . ja va 2s. co m*/
using System;
public class MainClass{
public static void Main(String[] argv){
Console.WriteLine(Convert.ToString((Single)123.123F));
}
}
The code above generates the following result.