using System; using System.Collections; public class Frobnikator { public Frobnikator() { const UInt32 SMALL_MASK = (1U << (24)) - 1; const ulong BIG_MASK = ~((ulong)SMALL_MASK); Hashtable table = new Hashtable(), inverseTable = new Hashtable(); Object boxedKey = 0UL & BIG_MASK, boxedValue = 0U; table[boxedKey] = boxedValue; inverseTable[boxedValue] = boxedKey; boxedKey = 0xFFFFffffFFFFffffUL & BIG_MASK; boxedValue = unchecked(0xFFFFffffU << 24); table[ boxedKey ] = boxedValue; inverseTable[ boxedValue ] = boxedKey; } }