Click here to Skip to main content
15,892,517 members
Home / Discussions / C#
   

C#

 
GeneralRe: retrieving images from access database Pin
Heath Stewart9-Feb-05 14:39
protectorHeath Stewart9-Feb-05 14:39 
GeneralGenerate a random number in a range... Pin
new_phoenix9-Feb-05 12:00
new_phoenix9-Feb-05 12:00 
GeneralRe: Generate a random number in a range... Pin
Christian Graus9-Feb-05 12:28
protectorChristian Graus9-Feb-05 12:28 
GeneralRe: Generate a random number in a range... Pin
new_phoenix9-Feb-05 13:59
new_phoenix9-Feb-05 13:59 
GeneralRe: Generate a random number in a range... Pin
Christian Graus9-Feb-05 14:13
protectorChristian Graus9-Feb-05 14:13 
GeneralRe: Generate a random number in a range... Pin
S. Senthil Kumar9-Feb-05 19:23
S. Senthil Kumar9-Feb-05 19:23 
GeneralRe: Generate a random number in a range... Pin
Stefan Troschuetz9-Feb-05 21:43
Stefan Troschuetz9-Feb-05 21:43 
GeneralRe: Generate a random number in a range... Pin
Stefan Troschuetz9-Feb-05 21:39
Stefan Troschuetz9-Feb-05 21:39 
I have some annotations to Christians posting.
1. You don't have to cast the result of the Random.Next method cause it already returns an integer.
2. The maxValue has to be 21 cause the returned integer is less than maxValue.
3. It doesn't hurt to explicitly initialize the Random object with a seed, although it isn't mandatory as stated by the other poster. Also you should think about using a fixed seed to always generate the same, reproducible random number sequence.

Random rnd = new Random(DateTime.Now.Ticks);// Generates different random number sequences.
Random rnd = new Random(1);// Generates always the same random number sequence.
int randomNumber = rnd.Next(1, 21);








www.troschuetz.de
GeneralActive directory 2003 and Exhange 2003 Pin
MarkusJ_NZ9-Feb-05 10:41
MarkusJ_NZ9-Feb-05 10:41 
GeneralInteresting studio 2003 bug. Pin
Anonymous9-Feb-05 10:32
Anonymous9-Feb-05 10:32 
GeneralRe: Interesting studio 2003 bug. Pin
Anonymous9-Feb-05 10:47
Anonymous9-Feb-05 10:47 
Generalprocess migration Pin
mpapeo9-Feb-05 10:22
mpapeo9-Feb-05 10:22 
GeneralRe: process migration Pin
Heath Stewart9-Feb-05 14:44
protectorHeath Stewart9-Feb-05 14:44 
GeneralBasic Deployment Doubt Pin
Soumya Mulukutla9-Feb-05 9:27
Soumya Mulukutla9-Feb-05 9:27 
GeneralRe: Basic Deployment Doubt Pin
S. Senthil Kumar9-Feb-05 9:30
S. Senthil Kumar9-Feb-05 9:30 
GeneralRe: Basic Deployment Doubt Pin
Soumya Mulukutla9-Feb-05 10:04
Soumya Mulukutla9-Feb-05 10:04 
GeneralRe: Basic Deployment Doubt Pin
Judah Gabriel Himango9-Feb-05 10:14
sponsorJudah Gabriel Himango9-Feb-05 10:14 
GeneralRe: Basic Deployment Doubt Pin
Soumya Mulukutla9-Feb-05 10:32
Soumya Mulukutla9-Feb-05 10:32 
GeneralRe: Basic Deployment Doubt Pin
Soumya Mulukutla9-Feb-05 10:35
Soumya Mulukutla9-Feb-05 10:35 
GeneralRe: Basic Deployment Doubt Pin
Judah Gabriel Himango9-Feb-05 11:01
sponsorJudah Gabriel Himango9-Feb-05 11:01 
GeneralC# - Channel already registered Pin
deceptionuk9-Feb-05 9:15
deceptionuk9-Feb-05 9:15 
GeneralRe: C# - Channel already registered Pin
S. Senthil Kumar9-Feb-05 9:27
S. Senthil Kumar9-Feb-05 9:27 
GeneralRe: C# - Channel already registered Pin
deceptionuk9-Feb-05 9:36
deceptionuk9-Feb-05 9:36 
GeneralRe: C# - Channel already registered Pin
Judah Gabriel Himango9-Feb-05 10:16
sponsorJudah Gabriel Himango9-Feb-05 10:16 
GeneralRe: C# - Channel already registered Pin
deceptionuk9-Feb-05 10:26
deceptionuk9-Feb-05 10:26 

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.