谢谢你看看这个问题.
我在传统的for block中看到了以下代码片段,但不确定它在其上下文中的重要性.
index <<= 1;
有关更多上下文,这里是完整的代码块.
ulong index = 1;
int distance = 0;
for (int i = 0; i < 64; i++)
{
if ((hash1 & index) != (hash2 & index))
{
distance++;
}
index <<= 1;
}
Run Code Online (Sandbox Code Playgroud)
它只是确保索引仍为1,如果不是,则将其值返回1?
其次,这是什么,所以我可以再读一遍.
最后,感谢您抽出时间和考虑此事.
c# ×1