Operators in C#

C# has the following operators.

Operator symbolOperator nameUser- overloadable
.Member accessNo
->Pointer to structNo
()Function callNo
[]Array/indexVia indexer
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
~Bitwise complementYes
*Value at addressNo
&Address of valueNo
<<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
!=Not equalsYes
^Exclusive OrYes
&&Conditional And Via &
||Conditional OrVia |
??Null coalescingNo
*=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 |
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.