Mega Code Archive

 
Categories / VB.Net / Data Types
 

Convert the input from Console to Integer

Imports System Imports Microsoft.VisualBasic Module MainClass     Sub Main( )         Dim newInteger As Integer         newInteger = 0         Try            System.Console.WriteLine("Enter an integer:")            newInteger = System.Convert.ToInt32(System.Console.ReadLine())         Catch exp As System.Exception            System.Console.WriteLine("Exception")         End Try                  System.Console.WriteLine("Your integer as a double is {0}", _                                  System.Convert.ToDouble(newInteger))     End Sub  End Module