Hello. I'm back after a long hiatus and I feel the rust creeping in. Never more shall I be without coding for so long.
Guys could you refresh my memory? How could I loop a random function to the .text of labels 1 - 10?
My code so far:
CODE
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Random RandomNumber = new Random();
int x = RandomNumber.Next(10);
this.label2.Text = Convert.ToString(x);
this.label3.Text = Convert.ToString(x);
}
}
}
Good thing is, I know what has to be done, the logic behind it. I just need to know the proper format.
There are two lines that write to the .text of the labels, however they write the same random value, that's why I need the loop.
Is there a way I could check my previous posts, I believe I made a post about my Bingo game that used something similar, maybe that will help me out.
Thanks DIC.

Edit: Guys I re-read my post and I think you'll have a hard time understanding it. I've drawn a lil pic for you. :3

Edit2: After toying around for a while, I've noticed that even I have to seperate random things, they still output the same "random" number.
CODE
private void button1_Click(object sender, EventArgs e)
{
Random RandomNumber = new Random();
int x = RandomNumber.Next(10);
Random lol = new Random();
int y = lol.Next(10);
label2.Text = Convert.ToString(x);
label3.Text = Convert.ToString(y);
}
Any reason to this? Randomnumer and lol are two distinct things. Why do they produce the same number if they are allegedly random?
This post has been edited by papuccino1: 15 May, 2008 - 06:02 PM