OK so I\'m a beginner with C# and I am having trouble understanding the if statement below.
For this example INumber is declared as 8, dPrice is 0 and dTAX is 10.
The following is from MSDN:
The conditional-OR operator (||) performs a logical-OR of its bool operands. If the first operand evaluates to true, the second operand isn't evaluated. If the first operand evaluates to false, the second operator determines whether the OR expression as a whole evaluates to true or false.
In your example the first condition (!=8) is false because iNumber = 8, but the second condition is (!=9), which is true. So that's why it goes into the braces.
If instead you say !=8 && !=9, it will not go in the braces because it doesn't satisfy both conditions.