R
Reginald Blue
This is purely out of curiosity.
In C and C++, the following statements invoke undefined behavior:
int i = 3;
i = i++;
(for reference:
http://www.eskimo.com/~scs/C-faq/q3.3.html )
Does the C# standard specify the behavior for such constructs? A quick test
reveals that the value assigned to i is 3 which is interesting, but not
particularly revealing.
--
Reginald Blue
"I have always wished that my computer would be as easy to use as my
telephone. My wish has come true. I no longer know how to use my
telephone."
- Bjarne Stroustrup (originator of C++) [quoted at the 2003 International
Conference on Intelligent User Interfaces]
In C and C++, the following statements invoke undefined behavior:
int i = 3;
i = i++;
(for reference:
http://www.eskimo.com/~scs/C-faq/q3.3.html )
Does the C# standard specify the behavior for such constructs? A quick test
reveals that the value assigned to i is 3 which is interesting, but not
particularly revealing.
--
Reginald Blue
"I have always wished that my computer would be as easy to use as my
telephone. My wish has come true. I no longer know how to use my
telephone."
- Bjarne Stroustrup (originator of C++) [quoted at the 2003 International
Conference on Intelligent User Interfaces]