Convert.ToInt32 (Int16) converts 16-bit signed integer to 32-bit signed integer. : Convert to Int32 « Development « VB.Net






Convert.ToInt32 (Int16) converts 16-bit signed integer to 32-bit signed integer.

  

Module Example
   Public Sub Main()
        Dim numbers() As Short = { Int16.MinValue, -1, 0, 121, 340, Int16.MaxValue }
        Dim result As Integer
        
        For Each number As Short In numbers
           result = Convert.ToInt32(number)
           Console.WriteLine(result)
        Next
   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 (Int64) converts 64-bit signed integer to 32-bit signed integer.
7.Convert.ToInt32 (Object) converts the value of the specified object to a 32-bit signed integer.
8.Convert.ToInt32 (SByte) converts 8-bit signed integer to 32-bit signed integer.
9.Convert.ToInt32 (Single) converts single-precision floating-point number to 32-bit signed integer.
10.Convert.ToInt32 (String) converts string to an equivalent 32-bit signed integer.
11.Convert.ToInt32 (String, IFormatProvider) converts string to 32-bit signed integer using culture-specific format
12.Convert.ToInt32 (String, Int32) converts string in a base to 32-bit signed integer.
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.