【发布时间】:2012-04-01 23:10:38
【问题描述】:
可能重复:
What is the diffference between the | and || or operators?
What does | (pipe) mean in c#?
我有一些代码是由办公室的另一位开发人员编写的,目前他不在。我对他的代码有一些工作要做,但我以前没有昏迷过。我尝试在这里搜索,但它剥夺了我的 |超出搜索范围。我也不知道那个符号的名字是什么,所以不能这样搜索。
this.Action.Values[key] = (int)this.Action.Values[key] | 1;
我的问题是,在这种情况下,single or 做什么?
【问题讨论】:
-
按位“或”和按位“与”en.wikipedia.org/wiki/Bitwise_operation
-
为重复的帖子道歉,正如我在问题中提到的,本网站上的搜索框删除了 |符号。
标签: c#