Click here to Skip to main content
15,922,696 members
Home / Discussions / C#
   

C#

 
GeneralRe: switch statemeent. Am I missing someting Pin
TheFoZ19-Jun-08 13:49
TheFoZ19-Jun-08 13:49 
GeneralRe: switch statemeent. Am I missing someting Pin
Ed.Poore19-Jun-08 14:12
Ed.Poore19-Jun-08 14:12 
GeneralOT: About string.Empty Pin
Guffa19-Jun-08 14:32
Guffa19-Jun-08 14:32 
GeneralRe: OT: About string.Empty Pin
Ed.Poore19-Jun-08 21:15
Ed.Poore19-Jun-08 21:15 
GeneralRe: OT: About string.Empty Pin
Scott Dorman21-Jun-08 1:58
professionalScott Dorman21-Jun-08 1:58 
GeneralRe: OT: About string.Empty Pin
Scott Dorman21-Jun-08 1:58
professionalScott Dorman21-Jun-08 1:58 
GeneralRe: switch statemeent. Am I missing someting Pin
PIEBALDconsult19-Jun-08 15:15
mvePIEBALDconsult19-Jun-08 15:15 
GeneralRe: switch statemeent. Am I missing someting Pin
Ed.Poore19-Jun-08 21:21
Ed.Poore19-Jun-08 21:21 
No it doesn't, I just compiled a sample and took a look at it under reflector and they definitely use two different methods, one compares a constant, the other compares the reference:
.entrypoint
.maxstack 2
.locals init (
[0] string toCompare,
[1] bool c1,
[2] bool c2)
L_0000: nop
L_0001: ldstr "Hello"
L_0006: stloc.0
L_0007: ldloc.0
<span style="color: Red;">L_0008: ldsfld string [mscorlib]System.String::Empty</span><br style="color: Red;"><span style="color: Red;">L_000d: call bool [mscorlib]System.String::op_Equality(string, string)</span>
L_0012: stloc.1 
L_0013: ldloc.0 
<span style="color: Green;">L_0014: ldstr ""</span><br style="color: Green;"><span style="color: Green;">L_0019: call bool [mscorlib]System.String::op_Equality(string, string)</span>
L_001e: stloc.2
L_001f: ret</br></br>




AnswerRe: switch statemeent. Am I missing someting Pin
Guffa21-Jun-08 6:35
Guffa21-Jun-08 6:35 
GeneralRe: switch statemeent. Am I missing someting Pin
TheFoZ19-Jun-08 22:13
TheFoZ19-Jun-08 22:13 
GeneralRe: switch statemeent. Am I missing someting Pin
Ed.Poore19-Jun-08 22:36
Ed.Poore19-Jun-08 22:36 
GeneralRe: switch statemeent. Am I missing someting Pin
Guffa19-Jun-08 14:15
Guffa19-Jun-08 14:15 
GeneralRe: switch statemeent. Am I missing someting Pin
Mark Churchill19-Jun-08 18:53
Mark Churchill19-Jun-08 18:53 
QuestionTele-type screen saver Pin
Elvis_Pretzelator19-Jun-08 9:32
Elvis_Pretzelator19-Jun-08 9:32 
AnswerRe: Tele-type screen saver Pin
Spacix One19-Jun-08 9:42
Spacix One19-Jun-08 9:42 
GeneralRe: Tele-type screen saver Pin
Elvis_Pretzelator19-Jun-08 9:47
Elvis_Pretzelator19-Jun-08 9:47 
GeneralRe: Tele-type screen saver Pin
Spacix One19-Jun-08 10:19
Spacix One19-Jun-08 10:19 
GeneralRe: Tele-type screen saver Pin
Elvis_Pretzelator25-Jun-08 10:02
Elvis_Pretzelator25-Jun-08 10:02 
GeneralRe: Tele-type screen saver Pin
Elvis_Pretzelator26-Jun-08 5:39
Elvis_Pretzelator26-Jun-08 5:39 
QuestionC# Thread termination issue Pin
Merlock219-Jun-08 8:39
Merlock219-Jun-08 8:39 
QuestionHelp: I'm new to C#: I want to make a global function Pin
TheFoZ19-Jun-08 8:27
TheFoZ19-Jun-08 8:27 
AnswerRe: Help: I'm new to C#: I want to make a global function Pin
Judah Gabriel Himango19-Jun-08 8:56
sponsorJudah Gabriel Himango19-Jun-08 8:56 
GeneralRe: Help: I'm new to C#: I want to make a global function Pin
TheFoZ19-Jun-08 9:03
TheFoZ19-Jun-08 9:03 
GeneralRe: Help: I'm new to C#: I want to make a global function Pin
Guffa19-Jun-08 11:20
Guffa19-Jun-08 11:20 
QuestionRadioButtonList Pin
john3419-Jun-08 7:59
john3419-Jun-08 7:59 

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.