Click here to Skip to main content
16,004,927 members
Home / Discussions / C#
   

C#

 
GeneralRe: Generating pairs of bools does not work as I expect it to Pin
Vikram A Punathambekar22-Mar-07 3:19
Vikram A Punathambekar22-Mar-07 3:19 
AnswerRe: Generating pairs of bools does not work as I expect it to Pin
CPallini22-Mar-07 2:57
mveCPallini22-Mar-07 2:57 
GeneralRe: Generating pairs of bools does not work as I expect it to Pin
Vikram A Punathambekar22-Mar-07 3:20
Vikram A Punathambekar22-Mar-07 3:20 
GeneralRe: Generating pairs of bools does not work as I expect it to Pin
Dan Neely22-Mar-07 3:26
Dan Neely22-Mar-07 3:26 
GeneralRe: Generating pairs of bools does not work as I expect it to Pin
CPallini22-Mar-07 3:55
mveCPallini22-Mar-07 3:55 
GeneralRe: Generating pairs of bools does not work as I expect it to Pin
Vikram A Punathambekar22-Mar-07 4:53
Vikram A Punathambekar22-Mar-07 4:53 
GeneralRe: Generating pairs of bools does not work as I expect it to Pin
CPallini22-Mar-07 5:16
mveCPallini22-Mar-07 5:16 
AnswerRe: Generating pairs of bools does not work as I expect it to Pin
Russell Jones22-Mar-07 3:05
Russell Jones22-Mar-07 3:05 
The Random object initialises itself with a value from the System Time so most of the time you're going to get the same value. occasionally the clock will tick over between calls. This seems to be the behaviour you're getting.

If i'm using random I tend to add it as an instance variable or as a public static variable of another class and call getNext() without resetting it.

I found this problem out the hard way and had to ask the good people on CP at the time.

Russ
GeneralRe: Generating pairs of bools does not work as I expect it to Pin
Vikram A Punathambekar22-Mar-07 3:21
Vikram A Punathambekar22-Mar-07 3:21 
AnswerRe: Generating pairs of bools does not work as I expect it to Pin
Corinna John22-Mar-07 4:34
Corinna John22-Mar-07 4:34 
GeneralRe: Generating pairs of bools does not work as I expect it to Pin
Vikram A Punathambekar22-Mar-07 4:58
Vikram A Punathambekar22-Mar-07 4:58 
AnswerRe: Generating pairs of bools does not work as I expect it to Pin
J4amieC22-Mar-07 4:50
J4amieC22-Mar-07 4:50 
GeneralRe: Generating pairs of bools does not work as I expect it to Pin
Vikram A Punathambekar22-Mar-07 4:56
Vikram A Punathambekar22-Mar-07 4:56 
AnswerRe: Generating pairs of bools does not work as I expect it to Pin
Russell Jones22-Mar-07 5:01
Russell Jones22-Mar-07 5:01 
Questionhow to get mp3 file total time Pin
Member 394958222-Mar-07 2:11
Member 394958222-Mar-07 2:11 
AnswerRe: how to get mp3 file total time Pin
Dawid Mazuruk22-Mar-07 3:58
Dawid Mazuruk22-Mar-07 3:58 
QuestionFill data to another table from Dataset Pin
Sarfaraj Ahmed22-Mar-07 1:43
Sarfaraj Ahmed22-Mar-07 1:43 
AnswerRe: Fill data to another table from Dataset Pin
rah_sin22-Mar-07 2:26
professionalrah_sin22-Mar-07 2:26 
GeneralRe: Fill data to another table from Dataset Pin
Sarfaraj Ahmed22-Mar-07 2:51
Sarfaraj Ahmed22-Mar-07 2:51 
QuestionKnowing who is a parent of a control Pin
sinosoidal22-Mar-07 1:31
sinosoidal22-Mar-07 1:31 
AnswerRe: Knowing who is a parent of a control Pin
Stefan Troschuetz22-Mar-07 2:03
Stefan Troschuetz22-Mar-07 2:03 
GeneralRe: Knowing who is a parent of a control Pin
sinosoidal22-Mar-07 2:15
sinosoidal22-Mar-07 2:15 
GeneralRe: Knowing who is a parent of a control Pin
Stefan Troschuetz22-Mar-07 2:34
Stefan Troschuetz22-Mar-07 2:34 
GeneralRe: Knowing who is a parent of a control Pin
Pete O'Hanlon22-Mar-07 2:44
mvePete O'Hanlon22-Mar-07 2:44 
GeneralRe: Knowing who is a parent of a control Pin
sinosoidal22-Mar-07 4:05
sinosoidal22-Mar-07 4:05 

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.