The below C# code snippet illustrates just that.
byte a, b; // May use other datatypes like int a = 1; b = 2; a ^= b; b ^= a; a ^= b; // Now a and b are swapped ////
Computer, Technology, Databases, Google, Internet, Mobile, Linux, Microsoft, Open Source, Security, Social Media, Web Development, Business, Finance
byte a, b; // May use other datatypes like int a = 1; b = 2; a ^= b; b ^= a; a ^= b; // Now a and b are swapped ////
No comments:
Post a Comment
Do provide your constructive comment. I appreciate that.