Sandeep Banerjee

Sandeep Banerjee

  • NA
  • 240
  • 45.4k

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)