Relation Vs Logical Vs Assignment Vs Conditional Operators in C# .NET Framework
Relation Vs Logical Vs Assignment Vs Conditional Operators in C# .NET
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Relation Vs Logical Vs Assignment Vs Conditional Operators in C# .NET Framework
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
sasikala sRank #1,091 · 1.7K reputationPosted May 23, 2025, 1:28 AM EDT
1. Relational Operators (Comparison Operators)
Relational operators are used to compare two operands and determine the relationship between them. They always return a boolean value (
trueorfalse).2. Logical Operators
Logical operators are used to combine or modify boolean expressions. They also return a boolean value (
trueorfalse). They are often used inif,while, andforstatements to create complex conditions.3. Assignment Operators
Assignment operators are used to assign a value to a variable. The most basic assignment operator is
=. There are also compound assignment operators that combine an arithmetic or bitwise operation with an assignment.4. Conditional Operator (Ternary Operator)
The conditional operator is a shorthand way to write an
if-elsestatement. It takes three operands: a condition, a value if the condition istrue, and a value if the condition isfalse.