Undo()
operation on the memento won't produce the expected result, unless we instruct the memento itself:Complete()
is called, the state of the Person
instance is changed but the stack contains one single change that, if undone, will revert back both the FirstName
and LastName
properties.