Operators in C#

C# has the following operators.

Operator symbolOperator nameUser- overloadable
()GroupingNo
.Member accessNo
->Pointer to structNo
()Function callNo
[]Array/indexVia indexer
++Post-incrementYes
--Post-decrementYes
newCreate instanceNo
stackallocUnsafe stack allocationNo
typeofGet type from identifierNo
checkedIntegral overflow check onNo
uncheckedIntegral overflow check offNo
sizeofGet size of structNo
+Positive value ofYes
-Negative value ofYes
!NotYes
~Bitwise complementYes
++Pre-incrementYes
--Pre-decrementYes
()CastNo
*Value at addressNo
&Address of valueNo
*MultiplyYes
/DivideYes
%RemainderYes
+AddYes
-SubtractYes
<<Shift leftYes
>>Shift rightYes
<Less thanYes
>Greater thanYes
<= Less than or equal toYes
>=Greater than or equal toYes
isType is or is subclass ofNo
asType conversionNo
==EqualsYes
!=Not equalsYes
&AndYes
^Exclusive OrYes
|OrYes
&&Conditional And Via &
||Conditional OrVia |
??Null coalescingNo
?:ConditionalNo
=AssignNo
*=Multiply self byVia *
/=Divide self byVia /
+=Add to selfVia +
-=Subtract from selfVia -
<<= Shift self left by Via <<
>>=Shift self right byVia >>
&= And self by Via &
^=Exclusive-Or self byVia ^
|=Or self byVia |
=>LambdaNo
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.