Click here to Skip to main content
15,896,912 members
Home / Discussions / C#
   

C#

 
RantRe: A reference to 'mscorlib' cannot be added Pin
harold aptroot9-Apr-10 3:30
harold aptroot9-Apr-10 3:30 
AnswerRe: A reference to 'mscorlib' cannot be added Pin
sekannak9-Apr-10 2:33
sekannak9-Apr-10 2:33 
GeneralRe: A reference to 'mscorlib' cannot be added Pin
Dave Kreskowiak9-Apr-10 3:19
mveDave Kreskowiak9-Apr-10 3:19 
AnswerRe: A reference to 'mscorlib' cannot be added Pin
Luc Pattyn9-Apr-10 2:36
sitebuilderLuc Pattyn9-Apr-10 2:36 
AnswerRe: A reference to 'mscorlib' cannot be added Pin
PIEBALDconsult9-Apr-10 4:41
mvePIEBALDconsult9-Apr-10 4:41 
Questionup_down control Pin
Member 5903109-Apr-10 1:33
Member 5903109-Apr-10 1:33 
AnswerRe: up_down control Pin
Dave Kreskowiak9-Apr-10 3:10
mveDave Kreskowiak9-Apr-10 3:10 
QuestionRandom.next(min,max) Pin
igalep1329-Apr-10 0:42
igalep1329-Apr-10 0:42 
Hey,
I'm using that method, but almost always (all executions) i get the same generated random int,
my the min is always 0, and the max moves from 1 to 3 (vector index)
no, almost always i get 0, even if max is 3 (5 executions and it's always 0) the same thing happens when max is 2...

the initialization of random object is with default constructor
new Random();


any idea how to make it be more statistical ?

thanks

p.s
I know that
default constructor works with Clock ticks
(from MSDN)
by default, the parameterless constructor of the Random class uses the system clock to generate its seed value
AnswerRe: Random.next(min,max) Pin
Luc Pattyn9-Apr-10 0:55
sitebuilderLuc Pattyn9-Apr-10 0:55 
GeneralRe: Random.next(min,max) Pin
igalep1329-Apr-10 1:02
igalep1329-Apr-10 1:02 
GeneralRe: Random.next(min,max) Pin
Luc Pattyn9-Apr-10 1:08
sitebuilderLuc Pattyn9-Apr-10 1:08 
GeneralRe: Random.next(min,max) Pin
igalep1329-Apr-10 1:18
igalep1329-Apr-10 1:18 
GeneralRe: Random.next(min,max) Pin
David Skelly9-Apr-10 2:05
David Skelly9-Apr-10 2:05 
GeneralRe: Random.next(min,max) Pin
PIEBALDconsult9-Apr-10 3:34
mvePIEBALDconsult9-Apr-10 3:34 
GeneralRe: Random.next(min,max) Pin
Luc Pattyn9-Apr-10 1:56
sitebuilderLuc Pattyn9-Apr-10 1:56 
GeneralRe: Random.next(min,max) Pin
David Skelly9-Apr-10 2:29
David Skelly9-Apr-10 2:29 
GeneralRe: Random.next(min,max) [modified] Pin
igalep1329-Apr-10 2:42
igalep1329-Apr-10 2:42 
GeneralRe: Random.next(min,max) Pin
David Skelly9-Apr-10 2:57
David Skelly9-Apr-10 2:57 
GeneralRe: Random.next(min,max) Pin
igalep1329-Apr-10 5:36
igalep1329-Apr-10 5:36 
AnswerRe: Random.next(min,max) Pin
Luc Pattyn9-Apr-10 2:18
sitebuilderLuc Pattyn9-Apr-10 2:18 
AnswerRe: Random.next(min,max) Pin
riced9-Apr-10 2:22
riced9-Apr-10 2:22 
GeneralRe: Random.next(min,max) Pin
David Skelly9-Apr-10 2:34
David Skelly9-Apr-10 2:34 
GeneralRe: Random.next(min,max) Pin
ragnaroknrol9-Apr-10 6:18
ragnaroknrol9-Apr-10 6:18 
GeneralRe: Random.next(min,max) Pin
Luc Pattyn9-Apr-10 2:39
sitebuilderLuc Pattyn9-Apr-10 2:39 
Questioncopi image from picturebox to scalablepicturebox control Pin
aasif aslam9-Apr-10 0:07
aasif aslam9-Apr-10 0:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.