C# Operators



Operators in C# are  symbol that tells the compiler to perform specific mathematical or logical manipulations.

Category                                                                                     Operator

Arithmetic                                                                                   (  + , - , *,  / , %)

Logical                                                                              ( & , | ,  ^ , ~ , && , || , !)

String                                                                                           concatenation +

Increment and decrement                                                                  ++ —

Bit shifting                                                                                        << >>

Comparison                                                                           ( == , != , < > , <= , >=)

Assignment                                                  ( = , += , -=, *= , /= , %= , &=, |= , ^= , <<= , >>=)

Member access (for objects and structs)                                              (  . )

Indexing (for arrays and indexers)                                                         [ ]

Cast                                                                                                         ( )

Object Creation                                                                                     new


No comments:

Post a Comment