You Learn Something (Scary) Every Day

Well it turns out you can actually use 'goto' statements in C# !!

    private void button1_Click(object sender, System.EventArgs e)

    {

        goto done;

        MessageBox.Show("Bet this doesn't get shown!");

        done: return;

    }

Conversation overheard in the next cubicle:

I didn't realise that VB.net still has 'goto' statements. Scary.

Want to know something even scarier?

(pause for a beat.)

C# has a goto statement too.

Really!?

Yeh, but no one ever uses it.

Why not?

Cause you'd be shot. That's why.

 

My book "Choose Your First Product" is available now.

It gives you 4 easy steps to find and validate a humble product idea.

Learn more.

(By the way, I read every comment and often respond.)

Your comment, please?

Your Name
Your Url (optional)
Note: I may edit, reuse or delete your comment. Don't be mean.