I am wanting to click the button and choose a number between 1, 20 then display the results in lblPickFive_1.Text When I try to run it I get errors all over the place. Error 1 A field initializer cannot reference the non-static field, method, or property 'LotteryTickets.Form1.random'
Warning 4 Unreachable code detected
string random;
string num = random.Next();
string num = random.Next(20);
private int RandomNumber(int min, int max)
{
Random random = new Random();
return random.Next(min, max);
lblPickFive_1.Text=num;
}
}