CSharp examples for Language Basics:if
Check two conditions and or them together
using System;//from w w w .j a v a2 s . c om using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; class Program { static void Main(string[] args) { // Input Console.Write("Do you love me? "); string input = Console.ReadLine(); // Evaluating string inputInSmall = input.ToLower(); if (inputInSmall == "yes" || inputInSmall == "no") { Console.WriteLine("OK."); } else { Console.WriteLine("Say it straight!"); } } }