What is the Operators in C#

Here we will learn about the operators in C#.
  • 2360

Introduction

C# is rich set of operators. In the programming language mostly operation performed with the help of the instruction (instruction is made with the help of the operators). A operator is a symbol that tell the computer certain operation. We can mathematical and logical manipulate with the help of operators. Mostly operators are come from the mathematics. Usually operators are used in programs to manipulate data and variables. Those operators who work with two operands are called binary operators. And those working with one operands are called unary operators. Some are work with three operands known as ternary operators. In some cases operators can be overloaded by the user in these cases they change there meaning.

The given table show a set of operators used in the c#

               Operator Name              Operator Symbol
     Sign operators      +    -
     Arithmetic      + - * / %
     logical operators Boolean bitwise)      & | ^ ! ~ && || true false
     String concatenation      +
     Increment, decrement      ++ --
     Shift      << >>
     Relational      == != < > <= >=
     Assignment      = += -= *= /= %= &= |= ^= <<= >>=
     Member access      .
     Indexing      [ ]
     Cast      ( )
     Ternary      ? :
  Delegate Concatenation and removal      + -
     Type information      as is sizeof typeof
     Overflow exception control      cheked uncheked
     Indirection and address      * -> [ ] &
     Lambda      =>
     Object  Creation      New
© 2020 DotNetHeaven. All rights reserved.