How do these practically differ?
// Approach one
if (x == 1)
DoSomething();
else if (x == 2)
DoSomethingElse();
// Approach two
if (x == 1)
DoSomething();
if (x == 2)
DoSomethingElse();
Is the resulting CIL the same?
(The question Use of “if/elseif/else” versus “if/else{if/else}” exists, but it is yet to be answered.)
If
DoSomethingsetsxto 2, then they will differ.