C# Convert ToSingle(Single)
Description
Convert ToSingle(Single)
returns the specified single-precision
floating-point number; no actual conversion is performed.
Syntax
Convert.ToSingle(Single)
has the following syntax.
public static float ToSingle(
float value
)
Parameters
Convert.ToSingle(Single)
has the following parameters.
value
- The single-precision floating-point number to return.
Returns
Convert.ToSingle(Single)
method returns value is returned unchanged.
Example
//w w w .ja va 2 s . c o m
using System;
public class MainClass{
public static void Main(String[] argv){
Console.WriteLine(Convert.ToSingle((Single)123.123F));
}
}
The code above generates the following result.