using System.Collections.Generic; namespace MementoPattern { /// /// 备忘录管理 /// public class Caretaker { // 存储多个备份 public Dictionary ContactMementoes { get; set; } public Caretaker() { ContactMementoes = new Dictionary(); } } }