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

C#

 
AnswerRe: a problem of multiple forms Pin
Ennis Ray Lynch, Jr.17-Nov-08 5:35
Ennis Ray Lynch, Jr.17-Nov-08 5:35 
QuestionCase select versus IF Statement Pin
EliottA17-Nov-08 4:59
EliottA17-Nov-08 4:59 
AnswerRe: Case select versus IF Statement Pin
Ennis Ray Lynch, Jr.17-Nov-08 5:03
Ennis Ray Lynch, Jr.17-Nov-08 5:03 
AnswerRe: Case select versus IF Statement Pin
#realJSOP17-Nov-08 6:04
mve#realJSOP17-Nov-08 6:04 
GeneralRe: Case select versus IF Statement Pin
EliottA17-Nov-08 6:12
EliottA17-Nov-08 6:12 
GeneralRe: Case select versus IF Statement Pin
#realJSOP17-Nov-08 6:31
mve#realJSOP17-Nov-08 6:31 
GeneralRe: Case select versus IF Statement Pin
Robert.C.Cartaino17-Nov-08 6:54
Robert.C.Cartaino17-Nov-08 6:54 
AnswerRe: Case select versus IF Statement Pin
Guffa17-Nov-08 6:29
Guffa17-Nov-08 6:29 
A switch is implemented differently depending on how many labels there are in it. If there are more than five (IIRC) labels, it's implemented using a hash table. If there are fewer labels it's implemented using if/else tests, so the earlier labels are the fastest to reach, but when it's implemented using a hash table it takes the same time to reach any of the labels.

So, if you have more than five if/else checks on the same value, you should definitely replace it with a switch.

Despite everything, the person most likely to be fooling you next is yourself.

GeneralRe: Case select versus IF Statement Pin
#realJSOP17-Nov-08 11:03
mve#realJSOP17-Nov-08 11:03 
GeneralRe: Case select versus IF Statement Pin
Guffa17-Nov-08 13:09
Guffa17-Nov-08 13:09 
GeneralRe: Case select versus IF Statement Pin
Luc Pattyn17-Nov-08 15:29
sitebuilderLuc Pattyn17-Nov-08 15:29 
QuestionWhat is this friggin .config file? Pin
Dewald17-Nov-08 4:34
Dewald17-Nov-08 4:34 
AnswerRe: What is this friggin .config file? Pin
led mike17-Nov-08 4:46
led mike17-Nov-08 4:46 
GeneralRe: What is this friggin .config file? Pin
Dewald17-Nov-08 21:05
Dewald17-Nov-08 21:05 
GeneralRe: What is this friggin .config file? Pin
led mike18-Nov-08 6:05
led mike18-Nov-08 6:05 
GeneralRe: What is this friggin .config file? Pin
Dewald18-Nov-08 22:03
Dewald18-Nov-08 22:03 
GeneralRe: What is this friggin .config file? Pin
led mike19-Nov-08 5:31
led mike19-Nov-08 5:31 
GeneralRe: What is this friggin .config file? Pin
Dewald19-Nov-08 6:00
Dewald19-Nov-08 6:00 
Questionefficient Pin
dole.doug17-Nov-08 4:05
dole.doug17-Nov-08 4:05 
AnswerRe: efficient Pin
Pr@teek B@h!17-Nov-08 4:11
Pr@teek B@h!17-Nov-08 4:11 
GeneralRe: efficient Pin
dole.doug17-Nov-08 5:07
dole.doug17-Nov-08 5:07 
AnswerRe: efficient Pin
Ennis Ray Lynch, Jr.17-Nov-08 5:04
Ennis Ray Lynch, Jr.17-Nov-08 5:04 
AnswerRe: efficient Pin
Alan Balkany18-Nov-08 3:39
Alan Balkany18-Nov-08 3:39 
QuestionHTTP POST problem Pin
gr9fci17-Nov-08 3:40
gr9fci17-Nov-08 3:40 
AnswerRe: HTTP POST problem Pin
leppie17-Nov-08 20:29
leppie17-Nov-08 20:29 

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.