Click here to Skip to main content
15,890,947 members
Articles / Programming Languages / C#

The goto-less goto!

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
7 Feb 2011CPOL 4.2K   2  
As this piece of code is normally a function, should be more readable if all of it is put inside a function returning a bool, indicating success or failure.The cleanup function could be only resource deallocation, not a function at all. If it is intended to use with C++ or C#, a try..finally...

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
Brazil Brazil
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions