Click here to Skip to main content
15,910,009 members
Home / Discussions / C#
   

C#

 
GeneralRe: Domain name verification Pin
RugbyLeague10-Dec-09 5:56
RugbyLeague10-Dec-09 5:56 
GeneralRe: Domain name verification Pin
Luc Pattyn10-Dec-09 6:04
sitebuilderLuc Pattyn10-Dec-09 6:04 
QuestionDatabase column mapping - draw lines between items in DataGridView Pin
Scott Bass10-Dec-09 0:51
Scott Bass10-Dec-09 0:51 
QuestionArray list question Pin
dennis_max279-Dec-09 23:37
dennis_max279-Dec-09 23:37 
AnswerRe: Array list question Pin
Rob Philpott10-Dec-09 0:22
Rob Philpott10-Dec-09 0:22 
AnswerRe: Array list question Pin
dennis_max2710-Dec-09 1:32
dennis_max2710-Dec-09 1:32 
AnswerRe: Array list question Pin
Keith Barrow10-Dec-09 1:39
professionalKeith Barrow10-Dec-09 1:39 
AnswerRe: Array list question Pin
Luc Pattyn10-Dec-09 1:58
sitebuilderLuc Pattyn10-Dec-09 1:58 
Hi,

- you have a single random generator, that is good.
- you don't need five or ten Labels, its much easier to show all five numbers in a single Label.
- you want to recognize not only "12345" but also all permutations thereof. Sorting the numbers is one way, but is unnecessary. The smart way to do this is by using a bit collection. Have a look at this:
int all=0;
all = all | (1<<number);
...
if (all==goodValue) output("WON");

Now try to use that to your advantage; the end result will be less than half the code you have now.

BTW: please use PRE tags, not CODE tags.

Smile | :)

Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]

I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages


GeneralRe: Array list question Pin
dennis_max2710-Dec-09 2:22
dennis_max2710-Dec-09 2:22 
GeneralRe: Array list question Pin
Luc Pattyn10-Dec-09 2:43
sitebuilderLuc Pattyn10-Dec-09 2:43 
AnswerRe: Array list question Pin
PIEBALDconsult10-Dec-09 5:57
mvePIEBALDconsult10-Dec-09 5:57 
QuestionSyntax error (missing operator) in query expression Pin
AlucardCode9-Dec-09 22:40
AlucardCode9-Dec-09 22:40 
AnswerRe: Syntax error (missing operator) in query expression Pin
OriginalGriff9-Dec-09 23:06
mveOriginalGriff9-Dec-09 23:06 
AnswerRe: Syntax error (missing operator) in query expression Pin
Ghydo9-Dec-09 23:17
Ghydo9-Dec-09 23:17 
GeneralRe: Syntax error (missing operator) in query expression Pin
AlucardCode9-Dec-09 23:34
AlucardCode9-Dec-09 23:34 
AnswerRe: Syntax error (missing operator) in query expression Pin
Scott Knestrick10-Dec-09 17:21
Scott Knestrick10-Dec-09 17:21 
QuestionBegin Invoke Example Pin
sureshhi9-Dec-09 22:33
sureshhi9-Dec-09 22:33 
AnswerRe: Begin Invoke Example: My Vote of 1 Pin
Keith Barrow9-Dec-09 23:38
professionalKeith Barrow9-Dec-09 23:38 
JokeRe: Begin Invoke Example Pin
Richard MacCutchan9-Dec-09 23:38
mveRichard MacCutchan9-Dec-09 23:38 
Questiondatabase Pin
farokhian9-Dec-09 22:24
farokhian9-Dec-09 22:24 
AnswerRe: database Pin
Eddy Vluggen10-Dec-09 0:35
professionalEddy Vluggen10-Dec-09 0:35 
AnswerRe: database Pin
Vimalsoft(Pty) Ltd10-Dec-09 2:08
professionalVimalsoft(Pty) Ltd10-Dec-09 2:08 
AnswerRe: database Pin
PIEBALDconsult10-Dec-09 4:01
mvePIEBALDconsult10-Dec-09 4:01 
QuestionToo many namespaces in a class Pin
Abhinav S9-Dec-09 22:07
Abhinav S9-Dec-09 22:07 
AnswerRe: Too many namespaces in a class Pin
Migounette9-Dec-09 22:17
Migounette9-Dec-09 22:17 

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.