我在 c 中有一个计算,我应该用 c# 编写它
这是我在 c 中的代码:
const unsigned long *S //which is an array that already contains data )
unsigned long y;
y = y + S[d]; //S[d] = 2582066069 and y = 3372499074 and the results is 1659597847
但在我的 C# 代码中:
ulong[] S = (ulong[])hashtable[key];
ulong y = 2582066069;
y = y + S[d]; // s[d] = 3372499074 but the result is = 5954565143
我不明白 c 和 c# 中的这个添加操作的区别你能不能帮我理解我做错了什么?