You can nest if statements as follows:
using System;
class Program
{
static void Main(string[] args)
{
int i = 5;
if (i > 0)
{
Console.WriteLine("more than 0");
if (i > 3)
{
Console.WriteLine("more than 3");
}
else
{
Console.WriteLine("less than 3");
}
}
}
}
The output:
more than 0
more than 3| w__w___w.j__a_v_a___2___s_.___c__o__m___ | Contact Us |
| Copyright 2009 - 12 Demo Source and Support. All rights reserved. |
| All other trademarks are property of their respective owners. |