Not really sure what you are asking, but the ++ operator can be
applied in front of a variable or behind it. If in front, the value is
incremented before the value is "looked at". If after, the value isn't
incremented until after it is "looked at".
The first ++ is called prefix and the second postfix.
On C++ if you like to add ++ to your own classes, you have to implement
separate operators for postfix and prefix ++ operators. However, this
article : http://devhawk.net/2003/07/10/Operator+Overloading+In+C.aspx
claims that for C# you have to implement only one operator, the compiler
handles the difference.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.