hi..
In the c-programming ...
suppose i =10;
i=i++;
The above statement will result that i is incremented by 1, the value of I is 11.
but,.. In the c# the value Of i is remain the same 10..
why?
Plz reply
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Apr 18, 2012, 6:10 AM
Kunal VaishyaPosted Apr 18, 2012, 12:48 AM
i=10 ;
i = ++i ;
you will get 11
Kunal VaishyaPosted Apr 18, 2012, 12:46 AM
No need to assign a vlue in same variable when you increment any value
if you use like this
Suppose
i =10;
i++;
you will be get 11 value 0f i
in c# it increment value after assigning thats why you get old value .