a=b+(b=a)*0;
This sentence can swap the value between a and b.
I've tried it with C# and it works.
But I just don't konw how it works.
e.g.
a = 1, b = 2
I list the steps of it as below:
b = a -> a = 1, b = 1
b * 0 -> a = 1, b = 1
b + 0 -> a = 1, b = 1
a = b -> a = 1, b = 1 ?
But the value of b may be wrong.
Could anyone help me? It puzzles me a lot.