C# Ternary Operator

Just like If statements, the C# Ternary operator tests a condition and initializes a variable with the result of the condition. The Ternary Operator Syntax <condition> ? <expression1> : <otherwise expression 2>; If the condition is satisfied Ternary operator returns expression 1; otherwise, it returns expression 2. Let us see an example using a C# … Read more