public static unsafe void SetDictionary(this RuntimeTypeHandle rtth, int dictionarySlot, IntPtr dictionary) { Debug.Assert(rtth.ToEETypePtr()->IsDynamicType&& dictionarySlot < rtth.GetNumVtableSlots()); *(IntPtr *)((byte *)rtth.ToEETypePtr() + sizeof(EEType) + dictionarySlot * IntPtr.Size) = dictionary; }