ms-dynamics.ru

Бара как качать

|| Operator (C# Reference)

The conditional-OR operator () performs a logical-OR of its operands. Бара как качать the first operand evaluates tothe second operand isn't evaluated. If the first operand evaluates tothe second operator determines whether the OR expression as a whole evaluates to or.

The operation

corresponds to the operation

except that if is бара как качать not evaluated because the OR operation is regardless of the value of.

This concept is known as "short-circuit" evaluation.

The conditional-OR operator cannot be overloaded, but overloads of the regular logical operators and the true and false operators are, with certain restrictions, also considered to be overloads of the conditional logical operators.

Example

In the following examples, the expression бара как качать uses evaluates only the first operand. The expression that uses evaluates both operands.

бара как качать

In the second example, a run-time exception occurs if both operands are evaluated.

See Also

C# Reference
C# Programming Guide
C# Operators

Источник: https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/conditional-or-operator