Login or Sign Up to become a member!
LessThanDot Sit Logo

LessThanDot

Desktop Developer

Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.

LTD Social Sitings

Lessthandot twitter Lessthandot Linkedin Lessthandot friendfeed Lessthandot facebook Lessthandot rss

Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.

Your profile

Search

XML Feeds

Google Ads

« Using ByrefOptional and named arguments in C# a comparison with SQL Server stored procs »
comments

A great use of Goto

by chrissie1 on Jul 01, 2009 in categories Microsoft Technologies
Rate Post:
submit to reddit Digg!FacebookDotnetkicks

I'm in the process of upgrading a legacy VB program and I found this

  1. 10:
  2.     For x as integer = 1 to whatever
  3.       if x = 1 then goto 20
  4.       dosomethingelse
  5. 20: Next

I'm gonna use this more often, it's cool.

About the Author

User bio imageChristiaan is a forensic technician who programs on the side, although my function description says that I do IT-things for 90% of the time . I'm an avid VB.NET fan and I use lots of the ALT.Net techniques, like unit-testing, nhibernate, logging, IoC, ...
Social SitingsTwitterLinkedInHomePageLTD RSS Feed
468 views
goto, vb.net
submit to reddit Digg!FacebookDotnetkicks

Comments and Feedback

4 comments

Comment from: thirster42 [Member] Email
****-
I know, goto's are so becoming cool again.
01/07/09 @ 07:20
Comment from: traingamer [Member] Email
*----
Huh?

What's wrong with:

For x as integer = 2 to whatever

and just skip the goto?

Or am I simply missing the sarcasm?
01/07/09 @ 08:07
Comment from: chrissie1 [Member] Email
2 words

Legacy application.
01/07/09 @ 08:32
Comment from: Naomi [Member] Email
:)))))))))) Very funny.
01/07/09 @ 21:07

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)