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