no edit summary
== Description ==
The Memento design pattern is used to store the state of an object so that it can later be restored to that state. In the diagram below the Originator object is creates a Memento that will store it's internal state and can later retrieve that state. The Caretaker
makes sure that only the object that creates the memento will be able to access it to restore it's state. Although if can have other uses, this pattern is often used for undo/redo operations in many different programs.
== Diagram ==
== Examples ==
This is a simple example of a memento in C#:
This is a simple example of a memento in Java: