Loading user information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading user information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

The if Decision Statement - Day 1 - Part 11

10 minutes, 30 seconds


Right click “Save as…”

The “if” statement allows us to add logic to our code, execute one code block if a certain condition exists, or execute a different code block if a certain condition doesn't exist. This video examines simple usage as well as more complex “if” statements.

Download the source code in c#

Download the source code in VB.Net

Follow the discussion

  • Oops, something didn't work.

    Getting subscription
    Subscribe to this conversation
  • Nice tutorial, thank you!

  • Good tutorials. Remind me though never to go on your gameshow haha

  • hejeonhejeon

    I'm Android App engineer.
    Good tutorials. thank you^^.
    I think Windows Phone Application (silverLight) is more easier then Android Application.
    And IDE tools also more powerful ( eclipse is very slow......)
    I'm Korean. So I don't have real Windows Phone.
    In Korea, WP will sold next year ㅠㅠ..

  • That's great! I'm learning a lot. I'm Mexican and I try to make videogames for WP7. This tutorial es good for learning,

  • Eddy FrometaEddy Frometa

    This are really good tutorials. I used to code with Visual Basic 6. I was good with the syntax in vb6. These are my first lessons with C# and it's very easy to learn. Thanks for sharing your knowledge ...

  • AwakeAwake

    Excellent tutorials.
    The "If" tutorial does not explain why I can't just use multiple "if" statements instead of the "else if" option. I wrote the example using multiple "if" instead of "else if" and it still works.

  • @Awake: If you do not include the else, then each of the if statements will be evaluated.

    If you do include the else, then if one of the if statements evaluates to true then the following else if statements do not need to be evaluated and the code will continue running after the block of else if statements (meaning less processing needs to occur).

    Hope that makes sense.

  • JorgeJorge

    Hi, i´ve been having this problem, when i want to 'double-click' a tool (like textBox, Button, etc) sometimes it takes me to the xml.cs so i can write the code, and sometimes nothing happens so i can continue. Why is that?

  • Yaya JallowYaya Jallow

    thanks microsoft for these wonderful videos, i'm release my first phone app onto Windows Phone 7 just becuase this

Remove this comment

Remove this thread


Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.