プログラムに乱数を生成させたい場合、次re-read/loop
のelse if statement
ようなステートメントが見つかるまでどうすればよいですか(button1.Text == "")
。
これは私のコードです、
private void button1_Click(object sender, EventArgs e)
{
var rc = new Random();
storeRI = rc.Next(1, 9);
if (storeRI == 1)
{
if (button1.Text == "")
{
button1.Text = "X";
}
else
{
//Need to generate another random number
//And read the else if statement again... how?
}
}
else if (storeRI == 2)
{
if (button1.Text == "")
{
button1.Text = "X";
}
else
{
//Need to generate another random number
//And read the else if statement again... how?
}
}