Operators in C# .NET

There are six kinds of operators in C&35; .NET. These are as follows:

Comparison:

==  <  >  <=  >=  !=
Arithmetic:

+  -  *  /
%  (mod)
/  (integer division if both operands are ints)
Math.Pow(x, y)
Assignment:

=  +=  -=  *=  /=   %=  &=  |=  ^=  <<=  >>=  ++  --
Bitwise:

&   |   ^   ~   <<   >>
Logical:

&&   ||   &   |   ^   !
Note: && and || perform short-circuit logical evaluations
String Concatenation:

+

 

Add a Comment