in C# is there a specific code to use to include a predetermined random number?
<p>I am finish up my Dice roll program and have been tweaking it here and there, my program currently allows the user to roll as many times as they would like however, Ive tried using different code in order for the player to be allowed only a certain number of rolls before they get the message that they have lost all their money, for example my game should predetermine a random number lets say 9, after 9 rolls they get the message and I reset everything and game over. im a newb :(</p>

<hr>

<p>Code from Comment</p>

<pre><code>private void button1_Click(object sender, EventArgs e) 
{ 
    rollagainLabel.Visible = true; 
    Random rand = new Random(); 
    roll1 = rand.Next(6) + 1; 
    int value = 100; 
    int sum = (roll1 * value); 
    runningTotal += sum; 
    totalmoneyLabel.Text = runningTotal.ToString("c"); 
    int maxRolls = rand.Next(5); 
    for (int i = 0; i &lt; maxRolls; i++) 
        if (roll1 == 1) 
        {
            diceBox1.Image = GAME.Properties.Resources._1Die; 
        }
} 
</code></pre>
