I have the following code. Random r works and gets me about 10% into the if. However rr doesn't seem to work. It always returns 0. What am I doing wrong?
I want to choose between two choices randomly only 10% of the time. This is in an asp.net app. The code gets executed on button click.
Random r = new Random();
Random rr = new Random();
int randomnum = r.Next(0, 100);
if (randomnum <= 10)
{
int randompick = rr.Next(0, 2);
if (randompick == 0)
{