How can i choose random number smaller than "1000" or "n" in vb?

Viewed 182

How can i choose random number smaller than "1000" or "n"?

Do While ddd <> 1
    Static staticRandomGenerator As New System.Random

    max += 1
    dd = staticRandomGenerator.Next(If(min > max, max, min), If(n > max, min, max))
    ddd = ee * dd Mod z
Loop

How can i add this condition to this code? Any idea?

1 Answers
Related