我在一段代码中遇到了这个声明:
Int32 medianIndex = colorList.Count >> 1;
colorList是一个班级列表System.Drawing.Color.
colorList
System.Drawing.Color
现在该语句应该检索列表的中间索引..就像它的半点..但我无法理解该>>符号是如何工作的以及"1"应该如何给出中位数索引..我会感谢一些帮助:S
>>
.net c# syntax operators
.net ×1
c# ×1
operators ×1
syntax ×1