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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!