Pages

Subscribe:

Ads 468x60px

Tuesday, March 13, 2012

how to use if Statement in asp.net using c#

The if statement is the powerhouse of conditional logic, able to evaluate any combination of
conditions and deal with multiple and different pieces of data. Here’s an example with an if
statement that features two conditions:
if (myNumber > 10)
{
// Do something.
}
else if (myString == "hello")
{
// Do something.
}
else
{
// Do something.
}

No comments:

Post a Comment