Convert.ToSingle (UInt32) converts 32-bit unsigned integer to single-precision floating-point number.
Class Sample
Public Shared Sub Main()
Dim numbers() As UInteger = { UInt32.MinValue, 121, 12345, UInt32.MaxValue }
Dim result As Single
For Each number As UInteger In numbers
result = Convert.ToSingle(number)
Console.WriteLine("Converted the {0} value '{1}' to the {2} value {3}.", _
number.GetType().Name, number, _
result.GetType().Name, result)
Next
End Sub
End Class
Related examples in the same category