How to Print Integers in Visual Basic

104 5
    • 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...
Subscribe to our newsletter
Sign up here to get the latest news, updates and special offers delivered directly to your inbox.
You can unsubscribe at any time

Leave A Reply

Your email address will not be published.