6. C# - IF/THEN/ELSE
SYNTAX:
if (condition)
{
do something
}
else if (condition)
{
do something
}
else
{
do something
}
Inline IF (Short IF)
(condition) ? valueIfTRUE : valueIfFALSE;
// returns the true or false values depending on the condition
SYNTAX:
if (condition)
{
do something
}
else if (condition)
{
do something
}
else
{
do something
}
Inline IF (Short IF)
(condition) ? valueIfTRUE : valueIfFALSE;
// returns the true or false values depending on the condition
Comments
Post a Comment