C# Convert ToSingle(Int64)
Description
Convert ToSingle(Int64)
converts the value of the specified
64-bit signed integer to an equivalent single-precision floating-point
number.
Syntax
Convert.ToSingle(Int64)
has the following syntax.
public static float ToSingle(
long value
)
Parameters
Convert.ToSingle(Int64)
has the following parameters.
value
- The 64-bit signed integer to convert.
Returns
Convert.ToSingle(Int64)
method returns A single-precision floating-point number that is equivalent to value.
Example
// ww w . j a v a 2 s . c o m
using System;
public class MainClass{
public static void Main(String[] argv){
System.Console.WriteLine(Convert.ToSingle((Int64)123));
}
}
The code above generates the following result.