XOR in C#
Random factoid:
Use ^ for bitwise XOR in C#, for example:
a = a ^ c; (or simply: a ^= c; )
Comments
- Anonymous
December 11, 2005
Thank you!!
I needed to code a method that used xor in C# and I didn't know how, I didn't have any resource besides google that could tell me, and when I googled, I did not have any luck, for maby ten minutes of searching >:( but then I found this. probelm solved. Thanks!!
solution completed, an exerpt of my code:
static bool toggle(bool input)
{
return input ^ true;
} - Anonymous
May 30, 2009
PingBack from http://outdoorceilingfansite.info/story.php?id=2190 - Anonymous
June 01, 2009
PingBack from http://woodtvstand.info/story.php?id=2606 - Anonymous
June 11, 2009
PingBack from http://castironbakeware.info/story.php?title=santomania-xor-in-c