Nested if
You can nest if statements inside another if.
bool hasTicket = true;bool isVIP = false;if (hasTicket){if (isVIP)Console.WriteLine("Welcome VIP!");elseConsole.WriteLine("Welcome regular guest.");}Run the Application
Section titled “Run the Application”dotnet runResult
Section titled “Result”Welcome regular guest.