• 0

VB Question


Question

Hey guys. I am making a hacking "game" in my first 3 days of programming in Visual Basic .NET. (w00t) Anyways, I would like to display a random number, as in how many ports are open. I saw this code in my reference book:

 Dim RandomGenerator As New Random

                    'Retrieve a random integer number from 1 to 356
                    Dim RandomInt As Integer = RandomGenerator.Next(1, 357)

Now, if this is right, how would I display it in the command prompt? Oh, and by the way, it's in command prompt. ;)

Thanks guys!

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

I 'think' you would want to use

Console.WriteLine(message)

This could be as simple as Console.WriteLine(RandomInt) or even Console.WriteLine("The random integer is " & RandomInt) or whatever...

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.