Convert.ToUInt32 (String, Int32) converts string in a base to 32-bit unsigned integer.
Class Sample
Public Shared Sub Main()
Dim value As String = Convert.ToString(Integer.MinValue, 16)
Try
Dim number As UInt32 = Convert.ToUInt32(value, 16)
Console.WriteLine("0x{0} converts to {1}.", value, number)
Catch e As OverflowException
Console.WriteLine("Unable to convert '0x{0}' to an unsigned integer.", _
value)
End Try
End Sub
End Class
Related examples in the same category