The following shortcuts x++ and ++x are the examples C# makes
it possible for you to use concise syntax to manipulate data in complex
ways.when i was a student I misunderstood most of the time in
implementing the x++,++x in programming.most of the
programmers who are fresher faced this problem once.
you have to concentrate on the meaning properly.that is The first
form(x++)increments x after the expression is evaluated, and the
second form(++x)increments x before the expression is evaluated.
let us clear with a example--
x=10;
z=x++; //the value of x will be assigned to z first then value will increment
z=++x;//the value of x will be incremented first then will be assigned to z.
Tuesday, October 27, 2009
Most of us make problems in the meaning of ++x and x++.
![](http://4.bp.blogspot.com/_4HKUHirY_2U/TIBWIk5TsUI/AAAAAAAABic/zPYi-iuOLTg/date.png)
![](http://3.bp.blogspot.com/_4HKUHirY_2U/TIBWhW5_9ZI/AAAAAAAABkE/ozQci0lBi6Y/user.png)
0 comments:
Post a Comment