The if Decision Statement - Day 1 - Part 11

Sign in to queue

Description

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

Embed

Download

Download this episode

The Discussion

  • User profile image
    PedroUSA

    Nice tutorial, thank you!

  • User profile image
    Mintydog

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

  • User profile image
    hejeon

    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 ㅠㅠ..
     

  • User profile image
    Angel​Giovanni

    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,

  • User profile image
    Eddy 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 ...

  • User profile image
    Awake

    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.
     

  • User profile image
    Scaran54

    @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.

  • User profile image
    Jorge

    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?

  • User profile image
    Yaya Jallow

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

Add Your 2 Cents