if statement has the following form
if (booleanExpression){
statement block; // execute if booleanExpression is true
}else{
statement block; // execute if booleanExpression is false
}
The following code prints out Here is the value if larger than 0.
using System;
class Program
{
static void Main(string[] args)
{
int i = 3;
if (i > 0)
{
Console.WriteLine("Here");
}
}
}
The output:
Here
| ww___w__.__j_a_va_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. |