I have made a simple number generator, and I have a question: is it possible for the generator to eject "red", "blue", "green", " yellow" and "white" instead of the numbers 1-5?
namespace zufallsgenerator
{
public partial class Form1 : Form
{
Random r = new Random();
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void btnWhlie_Click(object sender, EventArgs e)
{
int summe = 0, z;
lblAnzeige.Text = " ";
while (summe <= 0)
{
z = r.Next(1, 6);
summe = summe + z;
}
lblAnzeige.Text += summe + "\n";
}
}
}