Site icon Teaching Newbies since 2014

Introduction to C# in Unity3D #7: Operators – Part 2 📠

C# Unity3D Operators

C# Unity3D Operators

Introduction to C# in Unity #7:Operators - Part 2 📠

📠Comparison operators
📠A comparison operator compares two values.📠 <, >, <= , >=

📠Logical Operators
📠Logical operators are used in decision making and loops. Logical operators perform logical operation such as `And`, `Or` and `Not`. These operators evaluate expressions and return boolean values.
The logical And( &&) operator returns true if both operands evaluate to the boolean true
If one of the two operands is true then the expression evaluates to true using the Or || operator
The Not ! operator evaluates an expression and inverses the boolean result

Exit mobile version