If conditional statement is very important in any programming language. If condition is true, true block will execute other wise else block will execute.
syntax:
If(condition)
{
true block;
}
else
{
false block;
}
Example
if(string.IsNullOrEmpty(strCustName)
{
console.writeline(strCustName);
}
else
{
console.writeline("customer name is empty");
}
syntax:
If(condition)
{
true block;
}
else
{
false block;
}
Example
if(string.IsNullOrEmpty(strCustName)
{
console.writeline(strCustName);
}
else
{
console.writeline("customer name is empty");
}
Post a Comment
Please give your valuable feedback on this post. You can submit any ASP.NET article here. We will post that article in this website by your name.