Switch statement humor

Today during a code review session at a client, we spoke about using the switch statement in C#, instead of the if statement. A few hours later I got the reply that they were now using the switch statement.

if (Switch == 1)

{

        // do something here

}

else if (Switch == 2)

{

        // do something else

}

Funny 🙂

You may also like...

7 Responses

  1. Now why does Community Server add another comment to post A when you edit post B which contains a link to post A. Sorry Dennis 😉

    And what’s this? Code inspections? I thought no one ever did that 😛

  2. Now that’s a strange CS bug, though I think I’ve seen it before. How many times did you edit the post?

    That code is worthy of a DailyWTF!

  3. You never heard me say that! 🙂

  4. @Jayson : Hehehehe, standard CS behaviour. You’re the one with the CS knowledge here! 🙂

  5. Thats a good one, thanks for the tip!, laughing…

Click on a tab to select how you'd like to leave your comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.