public IntWrapper ToManaged() => managed = new IntWrapper() { i = *native };
public IntWrapperMarshaler(IntWrapper managed) { Value = (int *)Marshal.AllocCoTaskMem(sizeof(int)); *Value = managed.i; }
public void FromManaged(IntWrapper wrapper) { managed = wrapper; }