public override void LoadState(IMemento memento) { _Code = memento.GetInteger("Code"); _StockTag = (StockTag)memento.GetEnumValue("StockTag", typeof(StockTag)); if (_StockTag == StockTag.Text) { _MarkInfo = memento.GetString("MarkInfo"); } }