Wednesday, September 9, 2009

Generate Random Number1




namespace RandomNoGenerate1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void btn_RGenerate_Click(object sender, EventArgs e)
{
Random rdm= new Random();
textBox1.Text = rdm.Next(100, 1000).ToString();
listBox1.Items.Add(textBox1.Text);
}

private void btn_Add_Click(object sender, EventArgs e)
{
//listBox1.Items.Add(textBox1.Text);
}
}

No comments:

Post a Comment

Followers