Realms.Transaction.Rollback C# (CSharp) Method

Rollback() public method

Use explicitly to undo the changes in a Transaction, otherwise it is automatically invoked by exiting the block.
public Rollback ( ) : void
return void
        public void Rollback()
        {
            if (!_isOpen)
            {
                throw new Exception("Transaction was already closed. Cannot roll back");
            }

            _realm.SharedRealmHandle.CancelTransaction();
            _isOpen = false;
        }