Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

C# how to use if and else

string text = Console.ReadLine();
if(text == "yes")
{
    Console.WriteLine("Correct!");
}
else
{
    Console.WriteLine("Incorrect!");
}
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
5+1 =