Operation | Operator | Remarks |
---|---|---|
Add | + | Redefined on strings to provide string concatenation, so no other separate string concatenation operator is required corresponding to VB’s & operator. |
Increment | ++ | The ++x form is a prefix operation. The result of the operation is the value of the operand after it has been incremented. The x++ form is a postfix operation. The result of the operation is the value of the operand before it has been incremented. |
Decrement | -- | The --x form is a prefix operation. The result of the operation is the value of the operand after it has been decremented. The x-- form is a postfix operation. The result of the operation is the value of the operand before it has been decremented. |
Division | / | Redefined for each type – i.e. there is no separate integer division operator. |
Modulus | % |
A full list of C# operators is in MSDN.
No comments:
Post a Comment