hi
im trying to make a simple guess a number game for an assignment and i dont get why im getting a does not exist in the current context error here is my code i put the part that gets an error in red any help appreciated thx
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace GuessANumber
{
public partial class GuessANumber : Form
{
public GuessANumber()
{
InitializeComponent();
Random RandomClass = new Random();
int randomNumber;
randomNumber = RandomClass.Next(1, 5);
Random RandomClassB = new Random();
int randomNumberB;
randomNumberB = RandomClassB.Next(1, 5);
while (randomNumberB == randomNumber)
randomNumberB = RandomClassB.Next(1, 5);
}
private void Hint_MouseHover(object sender, EventArgs e)
{
Hint.Text = "The correct button is not #" + randomNumberB.ToString("C");
}
private void radioButton4_CheckedChanged(object sender, EventArgs e)
{
}
private void GuessANumber_Load(object sender, EventArgs e)
{
}
}
}