GetHashCode()
is not 32 bit nor 64 bit specific so calling it on a 32 bit system is the same as calling it on a 64 bit system.
It appears you are trying to reuse a hashcode for some kind of serialization purposes. You can't reliably do that. If it makes it easier, think of string's GetHashCode()
function as the following.
static Dictionary <string, int> HashCodes = new Dictionary<string, int>();
static Random Rand = new Random();
static int PsudoGetHashCode(string stringInQuestion)
{
lock(HashCodes)
{
int result;
if(!HashCodes.TryGetValue(stringInQuestion, out result)
{
result = Rand.Next();
HashCodes[stringInQuestion] = result;
}
return result;
}
}
You are only guaranteed to get the same GetHashCode()
value for the same string per run of the program, if you close the program and re-open it you can very possibly get a new value.
Your only solution that will give you reliable results is fix the design of your database to not store the built in GetHashCode()
from .NET