in Microsoft.Shared.Dna.Hash/AffineHash.cs [236:248]
public int GetHashCode(decimal value)
{
unsafe
{
/* Crack the layout of the structure. https://referencesource.microsoft.com/#mscorlib/system/decimal.cs */
byte* valuePointer = (byte*)&value;
ulong flags = (ulong)(*(int*)valuePointer);
ulong hi = (ulong)(*(int*)(valuePointer + sizeof(int)));
ulong lo = (ulong)(*(int*)(valuePointer + sizeof(int) + sizeof(int)));
ulong mid = (ulong)(*(int*)(valuePointer + sizeof(int) + sizeof(int) + sizeof(int)));
return (int)this.ComputeSmallBlock(this.ComputeSmallBlock(this.ComputeSmallBlock(this.ComputeSmallBlock(flags) + hi) + lo) + mid);
}
}