Sandeep Banerjee

Sandeep Banerjee

  • NA
  • 249
  • 264.1k

problem to use carets for swap of two number

Dec 8 2014 12:04 AM
a^=b
b^=a
a^=b
 
is this code work in c# for swap of two numbers. if yes what is the logic behind this i know it is OR operator but i thought that it is use only with bool function.

Answers (1)