lundi 1 juin 2015

Randomize my numbers in Visual Studio 2013

i'm new to Visual studio so.. i'm stuck.

I want to randomize between my numbers: 69, 119, 179. So when i press button1 it's gonna pick one of the 3 choices. And then show it in Textbox1. Just as simple as that.

i found a randomize video on youtube that showed this code:

Dim rndnumber As Random Dim number As Integer rndnumber = New Random number = rndnumber.Next(1, 1001) TextBox1.Text = number.ToString

I thought that it was the right code for that but it wasn't. As i told you guys i'm new to this so please help :)

//Fredrik.




Aucun commentaire:

Enregistrer un commentaire