The main format of the conditional statements if is as follows:
if (Boolean expression)
{
Body of the conditional statement;
}
The Boolean expression can be a Boolean variable or Boolean logical expression. Boolean expressions cannot be integer (unlike other programming languages like C and C++).
The body of the statement is the part locked between the curly brackets ( { } ). It may consist of one or more operations (statements). When there are several operations, we have a complex block operator.
|
In C#, as in most of the programming languages there is a conditional statement with else clause: the if-else statement. Its format is the following:
if (Boolean expression)
{
Body of the conditional statement;
}
else
{
Body of the else statement;
}
|
We Are Currently Working On Our Android Application Development and We already have two YouTube channels their name is CodeX or NightHawk. CodeX is for programming related videos and NightHawk is for online game streaming so please supporting us and Subscribe to our channels, Thank you