if usage in csharp code example
Example 1: if statement c#
if (condition)
{
print("Yes");
}
else
{
print("No");
}
Example 2: if else c#
if (condition)
{
// block of code to be executed if the condition is True
}
if (condition)
{
print("Yes");
}
else
{
print("No");
}
if (condition)
{
// block of code to be executed if the condition is True
}