Top "If-statement" questions

An "if" statement is a flow control structure in most programming languages that branches execution flow depending on a binary condition, generally evaluated at runtime.

Use string.Contains() with switch()

I'm doing an C# app where I use if ((message.Contains("test"))) { Console.WriteLine("yes"); } else if ((message.Contains("test2"))) { …

c# string if-statement switch-statement contains
Multiple conditions in if statement shell script

I would like to know whether it is possible to have more than two statements in an if statement when …

shell if-statement conditional account
jQuery if statement to check visibility

I'm trying to write a script that will hidden/show div depending on other elements visibility. The action should take …

jquery if-statement hide show visible
MYSQL Sum Query with IF Condition

I am building a query for a report with multiple IF conditions on the SUM. I am having problems with …

mysql if-statement sum
Help needed with Median If in Excel

I need to return a median of only a certain category on a spread sheet. Example Below Airline 5 Auto 20 Auto 3 …

excel function if-statement median
PHP: if !empty & empty

So i have this form.. With 2 fields. "Youtube" and "link" I want to do if you have filled in YouTube, …

php if-statement and-operator
How to negate code in "if" statement block in JavaScript -JQuery like 'if not then..'

For example if I want to do something if parent element for used element hasn't got ul tag as next …

javascript jquery if-statement conditional-statements
What is the relative performance difference of if/else versus switch statement in Java?

Worrying about my web application's performances, I am wondering which of "if/else" or switch statement is better regarding performance?

java performance switch-statement if-statement
Advantage of switch over if-else statement

What's the best practice for using a switch statement vs using an if statement for 30 unsigned enumerations where about 10 have …

c++ if-statement optimization switch-statement
Multiple IF statements between number ranges

I'm trying to set up a formula with multiple IF statements between number ranges but I'm seeing the error: Formula …

if-statement google-sheets google-sheets-formula