I have a calculation in c that I should write it in c#
this is my code in 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
but in my C# code:
ulong[] S = (ulong[])hashtable[key];
ulong y = 2582066069;
y = y + S[d]; // s[d] = 3372499074 but the result is = 5954565143
I don't undrestand the difference in this add operation in c and c# would you pelase help me too undrestand where I am doing wrong?