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

C#

 
GeneralRe: Control Box Color Pin
Henry Minute16-Jul-09 2:08
Henry Minute16-Jul-09 2:08 
GeneralRe: Control Box Color Pin
half-life16-Jul-09 20:40
half-life16-Jul-09 20:40 
AnswerRe: Control Box Color Pin
Dave Kreskowiak13-Jul-09 4:36
mveDave Kreskowiak13-Jul-09 4:36 
GeneralRe: Control Box Color Pin
half-life15-Jul-09 19:29
half-life15-Jul-09 19:29 
GeneralRe: Control Box Color Pin
Dave Kreskowiak16-Jul-09 15:55
mveDave Kreskowiak16-Jul-09 15:55 
GeneralRe: Control Box Color Pin
half-life16-Jul-09 20:42
half-life16-Jul-09 20:42 
Questionmedia not adding to play list Pin
uglyeyes13-Jul-09 1:52
uglyeyes13-Jul-09 1:52 
AnswerRe: media not adding to play list Pin
Anindya Chatterjee13-Jul-09 2:09
Anindya Chatterjee13-Jul-09 2:09 
GeneralRe: media not adding to play list Pin
uglyeyes13-Jul-09 2:22
uglyeyes13-Jul-09 2:22 
GeneralRe: media not adding to play list Pin
Anindya Chatterjee13-Jul-09 2:57
Anindya Chatterjee13-Jul-09 2:57 
GeneralRe: media not adding to play list [modified] Pin
uglyeyes13-Jul-09 4:01
uglyeyes13-Jul-09 4:01 
GeneralRe: media not adding to play list Pin
uglyeyes13-Jul-09 17:54
uglyeyes13-Jul-09 17:54 
GeneralRe: media not adding to play list Pin
uglyeyes14-Jul-09 13:39
uglyeyes14-Jul-09 13:39 
GeneralRe: media not adding to play list Pin
uglyeyes14-Jul-09 17:05
uglyeyes14-Jul-09 17:05 
Questionhow to generate 0's and 1's only through Random Class... Pin
spalanivel13-Jul-09 1:47
spalanivel13-Jul-09 1:47 
AnswerRe: how to generate 0's and 1's only through Random Class... Pin
Anindya Chatterjee13-Jul-09 2:02
Anindya Chatterjee13-Jul-09 2:02 
GeneralRe: how to generate 0's and 1's only through Random Class... Pin
spalanivel13-Jul-09 2:13
spalanivel13-Jul-09 2:13 
GeneralRe: how to generate 0's and 1's only through Random Class... Pin
Anindya Chatterjee13-Jul-09 2:48
Anindya Chatterjee13-Jul-09 2:48 
AnswerRe: how to generate 0's and 1's only through Random Class... Pin
Luc Pattyn13-Jul-09 3:01
sitebuilderLuc Pattyn13-Jul-09 3:01 
spalanivel wrote:
private int RandomNumber(int min, int max) {
Random random = new Random();
return random.Next(min, max);
}


Don't create Random objects all the time, it makes no sense, since the Random class guarantees Next() will generate random numbers INSIDE a Random object, not AMONGST different Random objects. Instead create your Random object once, and keep a reference to it as a class member.

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.

QuestionHow to Use PropertyGrid for Complex Class Pin
Anindya Chatterjee13-Jul-09 1:45
Anindya Chatterjee13-Jul-09 1:45 
AnswerRe: How to Use PropertyGrid for Complex Class Pin
Henry Minute13-Jul-09 3:13
Henry Minute13-Jul-09 3:13 
GeneralRe: How to Use PropertyGrid for Complex Class Pin
Anindya Chatterjee13-Jul-09 3:16
Anindya Chatterjee13-Jul-09 3:16 
QuestionUpdating Text File Pin
vishal moharikar13-Jul-09 1:27
vishal moharikar13-Jul-09 1:27 
AnswerRe: Updating Text File Pin
musefan13-Jul-09 4:00
musefan13-Jul-09 4:00 
GeneralRe: Updating Text File Pin
vishal moharikar15-Jul-09 19:20
vishal moharikar15-Jul-09 19:20 

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.