Click here to Skip to main content
15,916,683 members
Home / Discussions / C#
   

C#

 
GeneralRe: Network programming Pin
turbochimp4-Mar-05 11:05
turbochimp4-Mar-05 11:05 
GeneralException Handling - back into method Pin
Seraphin4-Mar-05 1:25
Seraphin4-Mar-05 1:25 
GeneralRe: Exception Handling - back into method Pin
Chamadness4-Mar-05 1:51
Chamadness4-Mar-05 1:51 
GeneralRe: Exception Handling - back into method Pin
Colin Angus Mackay4-Mar-05 2:03
Colin Angus Mackay4-Mar-05 2:03 
GeneralA perfect example where goto should be used Pin
leppie4-Mar-05 5:19
leppie4-Mar-05 5:19 
GeneralRe: A perfect example where goto should be used Pin
Dave Kreskowiak4-Mar-05 7:28
mveDave Kreskowiak4-Mar-05 7:28 
GeneralRe: A perfect example where goto should be used Pin
turbochimp4-Mar-05 11:13
turbochimp4-Mar-05 11:13 
GeneralRe: A perfect example where goto should be used Pin
Rob Graham4-Mar-05 11:39
Rob Graham4-Mar-05 11:39 
Maybe you should use IlDecompiler and look at the IL generated from some of your nice 'fall through' c# code. I think you'll find it is liberally sprinkled with goto's. The closer you get to the machine, the more useful and sensible goto gets to be.
what is gosub other than a void method call? is goto really any different than
if(true)<br />
  ...<br />
else<br />
  ...


I would agree that if-else is preferable for clatity: the brace blocks are clearer than a lable, but the result is no different: code branches to a new location under some conditions.

In leppies example, if there were multiple try-catch blocks in the same function, a goto and a common cleanup code block would be preferable for maintainability to repeating the code in each catch block...







Anger is the most impotent of passions. It effects nothing it goes about, and hurts the one who is possessed by it more than the one against whom it is directed.
Carl Sandburg

GeneralRe: A perfect example where goto should be used Pin
turbochimp5-Mar-05 6:10
turbochimp5-Mar-05 6:10 
GeneralRe: A perfect example where goto should be used Pin
leppie4-Mar-05 11:49
leppie4-Mar-05 11:49 
GeneralRe: A perfect example where goto should be used Pin
Dave Kreskowiak4-Mar-05 16:08
mveDave Kreskowiak4-Mar-05 16:08 
GeneralRe: A perfect example where goto should be used Pin
Rob Graham4-Mar-05 17:05
Rob Graham4-Mar-05 17:05 
GeneralRe: A perfect example where goto should be used Pin
turbochimp5-Mar-05 6:12
turbochimp5-Mar-05 6:12 
GeneralC# / Oracle --&gt;Getting ByteArray from field(VARCHAR(250) Pin
Anonymous4-Mar-05 1:03
Anonymous4-Mar-05 1:03 
GeneralCE MAPI problem Pin
ppp0013-Mar-05 23:45
ppp0013-Mar-05 23:45 
GeneralPath to executable for a service Pin
MBAndersen3-Mar-05 23:05
MBAndersen3-Mar-05 23:05 
Generalwant code for add,del,update to db (c#) Pin
chandtec3-Mar-05 22:56
chandtec3-Mar-05 22:56 
GeneralRe: want code for add,del,update to db (c#) Pin
Sebastian Schneider3-Mar-05 22:59
Sebastian Schneider3-Mar-05 22:59 
GeneralRe: want code for add,del,update to db (c#) Pin
Colin Angus Mackay3-Mar-05 23:24
Colin Angus Mackay3-Mar-05 23:24 
GeneralRe: want code for add,del,update to db (c#) Pin
Sebastian Schneider3-Mar-05 23:27
Sebastian Schneider3-Mar-05 23:27 
GeneralRe: want code for add,del,update to db (c#) Pin
J4amieC4-Mar-05 0:14
J4amieC4-Mar-05 0:14 
GeneralRe: want code for add,del,update to db (c#) Pin
Kodanda Pani7-Mar-05 1:01
Kodanda Pani7-Mar-05 1:01 
GeneralC++ and Bios Pin
SESCO LIBYA3-Mar-05 22:42
SESCO LIBYA3-Mar-05 22:42 
GeneralRe: C++ and Bios Pin
leppie3-Mar-05 23:38
leppie3-Mar-05 23:38 
GeneralWindows Service &amp; SendMessage Pin
s211197923-Mar-05 22:15
s211197923-Mar-05 22:15 

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.