0
How to generate negative random integers in C#
Is there a way to generate any random number from -2,147,483,648 to 2,147,483,647?
2 odpowiedzi
0
Random r= new Random(<Startint>,<Endint>);
r.Next();
Where Startint - number, which less Endint.
For example:new Random(-20, 50)
0
GDSHNIK
Pretty sure the Random constructor accepts either empty or a specified seed value, while Next() always returns a non-negative integer