static ExceptionOffset() { Type type = typeof(ExceptionOffset); FieldInfo[] fi = type.GetFields(); int size = IntPtr.Size; for (int i = 0; i < fi.Length; i++) { fi[i].SetValue(null, (i * size) + ObjectOffset.ob_type + size); } }