Click here to Skip to main content
15,888,401 members
Articles / Programming Languages / C#

The goto-less goto!

Rate me:
Please Sign up or sign in to vote.
3.27/5 (11 votes)
29 Apr 2010CPOL 10.2K   2  
Use C++ exceptions:try{ if (condition1_fails) throw 1; ... if (condition2_fails) throw 2; ... ... if (conditionN_fails) throw N; PerformActionOnAllSuccess(); DoNormalCleanup();}catch (int condition){ printf("The condition %d fails!\n",...

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Engineer Cutlite Penta S.r.l.
Italy Italy
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions