0^1

  • Thread starter Thread starter AA2e72E
  • Start date Start date
A

AA2e72E

Been sctraching my head about why the result is 1!

What is the powerof operator in C#?
 
Because ^ is the bitwise XOR (exclusive-or) operator.

Not to be confused with 1 to the power of zero, which actually *should* be 1
:-)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top