是^运算符真的在C#中的XOR运算符? [英] Is the ^ operator really the XOR operator in C#?

查看:301
本文介绍了是^运算符真的在C#中的XOR运算符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我读了 ^ 运营商在C#中的逻辑XOR运算符,但我也认为这是运营商的力量。是什么原因呢?

I read that the ^ operator is the logical XOR operator in C#, but I also thought it was the "power of" operator. What is the explanation?

推荐答案

这不是C#运营商的力量,因为有在C#中没有这样的运营商。这仅仅是XOR运算。

It is not the power of operator of C# since there is no such operator in C#. It is just the XOR operator.

有关权力,使用的 Math.Pow

你可以在此页面上看到的C#操作符 ^ 下的逻辑上市(布尔和位)类别,这意味着它可以处理两个布尔值,和二进制值(按位异或)。

As you can see from this page on the C# Operators, ^ is listed under the "Logical (boolean and bitwise)" category, which means it can both handle boolean values, and binary values (for bitwise XOR).

这篇关于是^运算符真的在C#中的XOR运算符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆