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.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
VulpesRank #55 · 29.2K reputationPosted Dec 8, 2014, 12:24 AM EST