Exclude Numbers from Random

# Thread: Exclude Numbers from Random

1. Senior Member
Join Date
Dec 1969
Posts
204

## Exclude Numbers from Random

How would exclude 1 or 2 numbers from from Random possibilities.<BR><BR>Say I don&#039;t want 3 or 5 to be a possible result from the following:<BR><BR>for (y = 0; y &#060; Total; y++)<BR>int randomNum = rand.Next(y, Total + 1);<BR><BR><BR><BR><BR><BR><BR>

2. Senior Member
Join Date
Dec 1969
Posts
204

## Isn't this do-able?

?

3. Senior Member
Join Date
Dec 1969
Posts
204

## Hey! Bill Wilk., Desert G, God, etc. Over Here!!

Actually, I asked a genius what approach he would take to accomplishing my task. He quickly explained that he would create the random set, then exclude the members. Obviously ...<BR><BR>But the devil is in the details, and I only had his attention for about two minutes. So, I guess I&#039;m saying, I know it is possible to exclude numbers from the random set, but how?<BR><BR>Please, any ideas or comments appreciated ...

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•