Click here to Skip to main content
14,664,816 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
 
JokeRe: Where Is IntelliSense For "goto" statements? Pin
urbane.tiger12-Jul-10 2:53
Memberurbane.tiger12-Jul-10 2:53 
GeneralRe: Where Is IntelliSense For "goto" statements? Pin
glennPattonInThePubAgain!12-Jul-10 6:08
professionalglennPattonInThePubAgain!12-Jul-10 6:08 
GeneralRe: Where Is IntelliSense For "goto" statements? Pin
RichardM112-Jul-10 17:00
MemberRichardM112-Jul-10 17:00 
GeneralRe: Where Is IntelliSense For "goto" statements? Pin
chrissb12-Jul-10 6:47
Memberchrissb12-Jul-10 6:47 
GeneralRe: Where Is IntelliSense For "goto" statements? Pin
englebart12-Jul-10 7:45
professionalenglebart12-Jul-10 7:45 
GeneralRe: Where Is IntelliSense For "goto" statements? Pin
chrissb12-Jul-10 9:29
Memberchrissb12-Jul-10 9:29 
GeneralRe: Where Is IntelliSense For "goto" statements? [modified] Pin
Sergelp12-Jul-10 22:53
MemberSergelp12-Jul-10 22:53 
GeneralRe: Where Is IntelliSense For "goto" statements? Pin
Richard Blythe13-Jul-10 5:20
MemberRichard Blythe13-Jul-10 5:20 
My primary reason is for complex validation that share the same exception. Here's an example:

public void validateSomething(someComplexType)
{
  if (first_conditionFails)
     goto Label_Error;
  else if (complexAlgorithmRequired)
  {
     //init vars for algorithm...
     if (first_conditionFails)
        goto Label_Error;
     else if (second_conditionFails)
        goto Label_Error;
     else //perform second phase of algorithm
     {
         //init vars for second phase...
         if (first_conditionFails)
            goto Label_Error;
         else if (second_conditionFails)
            goto Label_Error;         
     }
  }
  //skip the end-of-routine error code
  return;

  Label_Error:
    //set class vars...
    //to an invalid state...
    //...
    throw new someException();
}


How would you implement this with try/catch without a whole bunch of "throw someException()"?
The mind is like a parachute. It doesn’t work unless it’s open.

AnswerRe: Where Is IntelliSense For "goto" statements? Pin
engchin13-Jul-10 14:59
Memberengchin13-Jul-10 14:59 
GeneralRe: Where Is IntelliSense For "goto" statements? Pin
Sergelp13-Jul-10 22:16
MemberSergelp13-Jul-10 22:16 
AnswerRe: Where Is IntelliSense For "goto" statements? Pin
Bujar Tahiri13-Jul-10 2:15
MemberBujar Tahiri13-Jul-10 2:15 
GeneralRe: Where Is IntelliSense For "goto" statements? Pin
YSLGuru22-Jul-10 7:49
MemberYSLGuru22-Jul-10 7:49 
JokeLittle Johnny the Smart Salesman!!! Pin
Sandeep Mewara10-Jul-10 3:35
mentorSandeep Mewara10-Jul-10 3:35 
GeneralRe: Little Johnny the Smart Salesman!!! Pin
LloydA11110-Jul-10 3:41
MemberLloydA11110-Jul-10 3:41 
GeneralRe: Little Johnny the Smart Salesman!!! Pin
peterchen10-Jul-10 5:01
Memberpeterchen10-Jul-10 5:01 
GeneralRe: Little Johnny the Smart Salesman!!! Pin
LunaticFringe10-Jul-10 5:44
MemberLunaticFringe10-Jul-10 5:44 
GeneralRe: Little Johnny the Smart Salesman!!! Pin
Indivara10-Jul-10 15:09
professionalIndivara10-Jul-10 15:09 
GeneralRecent Article - .Net layered Framework Link [fixed] Pin
Garth J Lancaster10-Jul-10 2:54
professionalGarth J Lancaster10-Jul-10 2:54 
GeneralRe: Recent Article - .Net layered Framework Link Pin
JF201510-Jul-10 3:13
MemberJF201510-Jul-10 3:13 
GeneralRe: Recent Article - .Net layered Framework Link Pin
Garth J Lancaster10-Jul-10 3:15
professionalGarth J Lancaster10-Jul-10 3:15 
GeneralRe: Recent Article - .Net layered Framework Link Pin
Nish Nishant10-Jul-10 4:03
sitebuilderNish Nishant10-Jul-10 4:03 
GeneralRe: Recent Article - .Net layered Framework Link Pin
OriginalGriff10-Jul-10 4:38
mveOriginalGriff10-Jul-10 4:38 
GeneralRe: Recent Article - .Net layered Framework Link Pin
Abhinav S10-Jul-10 5:21
MemberAbhinav S10-Jul-10 5:21 
GeneralRe: Recent Article - .Net layered Framework Link Pin
Garth J Lancaster10-Jul-10 18:14
professionalGarth J Lancaster10-Jul-10 18:14 
GeneralJoke thief Pin
pseudonym6710-Jul-10 0:47
Memberpseudonym6710-Jul-10 0:47 

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.