Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

C# If Statements

bool isMale = false;
bool isTall = false;

if (isMale && isTall)
{
    Console.WriteLine("You are a tall male");
} else if (isMale && !isTall)
{
    Console.WriteLine("You are a short male");
}else if (!isMale && isTall)
{
    Console.WriteLine("You are not male but you are tall");
}else
{
    Console.WriteLine("You are not male and you are not tall");
}
        

Console.ReadLine();
Source by # #
 
PREVIOUS NEXT
Tagged: #If #Statements
ADD COMMENT
Topic
Name
6+7 =