public static IntPtr ObjectBaseToPtrNotNull(InternalObjectBase obj) { return(obj?.Pointer ?? throw new NullReferenceException()); }
public static IntPtr ObjectBaseToPtr(InternalObjectBase obj) { return(obj?.Pointer ?? IntPtr.Zero); }