Mid GoF Patterns

Undo Action:?

  • The caretaker calls Save() to store a Memento whenever the text is

changed. When an undo is triggered, the caretaker pops the most recent

Memento from the stack and asks the TextEditor to restore itself to the

state saved in that memento.

Benefits of the Memento Pattern:

More from Design Patterns in C#

All questions for this course