【发布时间】:2023-04-08 14:51:01
【问题描述】:
我在 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# 中这个添加操作的区别 你能不能帮我弄明白我哪里做错了?
【问题讨论】:
-
为什么不在两个计算中使用完全相同的示例数字?