Question: Why can't I get this random number generating form to work? using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text;
Why can't I get this random number generating form to work?
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms;
namespace WindowsFormsApp3 { public partial class Form1 : Form { Random Ran = new Random(); int value;
public Form1() { InitializeComponent(); }
private void Button1_Click(object sender, EventArgs e) { value = Ran.Next(1, 69); label1.Text = value.ToString();
} } }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
