XOR ^ in C#

This is a discussion on XOR ^ in C# within the C# Programming forums, part of the General Programming Boards category; please tell me, hOw can i Use XOR (^) Operator and what Library i have to use??...

  1. #1
    Registered User
    Join Date
    Nov 2006
    Posts
    39

    XOR ^ in C#

    please tell me, hOw can i Use XOR (^) Operator and what Library i have to use??

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    It's an operator, you don't have to use a library.
    My best code is written with the delete key.

  3. #3
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    XOR is the eXclusive OR operator.

    0x8000 ^ 0x8000 = 0x0000

    In laymen's terms. It flips bits.

    0x0000 ^ 0x8000 = 0x8000

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21