Convert.ToInt32 (String, Int32) converts string in a base to 32-bit signed integer. : Convert to Int32 « Development « VB.Net






Convert.ToInt32 (String, Int32) converts string in a base to 32-bit signed integer.

  

Module Example
   Public Sub Main()
        Dim value As String = Convert.ToString(CLng(Integer.MaxValue) + 1, 16)
        Try
           Dim number As Integer = Convert.ToInt32(value, 16)
           Console.WriteLine("0x{0} converts to {1}.", value, number)
        Catch e As Exception
           Console.WriteLine("Exception")
        End Try   
   End Sub 
End Module 

   
    
  








Related examples in the same category

1.Convert.ToInt32 (Boolean) converts Boolean value to 32-bit signed integer.
2.Convert.ToInt32 (Byte) converts 8-bit unsigned integer to 32-bit signed integer.
3.Convert.ToInt32 (Char) converts Unicode character to 32-bit signed integer.
4.Convert.ToInt32 (Decimal) converts decimal number to 32-bit signed integer.
5.Convert.ToInt32 (Double) converts double number to 32-bit signed integer.
6.Convert.ToInt32 (Int16) converts 16-bit signed integer to 32-bit signed integer.
7.Convert.ToInt32 (Int64) converts 64-bit signed integer to 32-bit signed integer.
8.Convert.ToInt32 (Object) converts the value of the specified object to a 32-bit signed integer.
9.Convert.ToInt32 (SByte) converts 8-bit signed integer to 32-bit signed integer.
10.Convert.ToInt32 (Single) converts single-precision floating-point number to 32-bit signed integer.
11.Convert.ToInt32 (String) converts string to an equivalent 32-bit signed integer.
12.Convert.ToInt32 (String, IFormatProvider) converts string to 32-bit signed integer using culture-specific format
13.Convert.ToInt32 (UInt16) converts 16-bit unsigned integer to 32-bit signed integer.
14.Convert.ToInt32 (UInt32) converts 32-bit unsigned integer to 32-bit signed integer.
15.Convert.ToInt32 (UInt64) converts 64-bit unsigned integer to an equivalent 32-bit signed integer.