How to Print Integers in Visual Basic
- 1). Open Visual Basic and create a new project by clicking "File" and "New Project." Select "Console Application." Later, you can apply the same code to a full Windows Graphical User Interface (GUI) application with no modifications.
- 2). Paste the following within the "Main" method to declare and print an integer to the console. Since this is the entire program, it will wait for a user to press a key before closing the program.
Dim a As Integer = 10
Console.WriteLine(a)
Console.WriteLine("This is something I want to write " & a)
Console.ReadKey() - 3). Press the green "run" arrow.
Source...