SerializationInfoEnumerator enumerator = info.GetEnumerator(); while (enumerator.MoveNext()) { if (enumerator.Value != null) { if (enumerator.Name == "Caption") { this.caption = Convert.ToString(enumerator.Value); } else if (enumerator.Name == "Mark") { this.mark = Convert.ToString(enumerator.Value); } else if (enumerator.Name == "ImageIndex") { this.imageIndex = Convert.ToInt32(enumerator.Value); } else if (enumerator.Name == "ChildMenus") { this.childMenus = enumerator.Value as List<ToolMenu>; } else if (enumerator.Name == "DisplayStyle") { this.displayStyle = (MenuDisplayStyle)enumerator.Value; } else if (enumerator.Name == "GUID") { this.guid = Convert.ToString(enumerator.Value); } else if (enumerator.Name == "ISchecked") { this.isChecked = Convert.ToBoolean(enumerator.Value); } else if (enumerator.Name == "ISAllowCheck") { this.isAllowCheck = Convert.ToBoolean(enumerator.Value); } else if (enumerator.Name == "ISAllowDropIn") { this.isAllowDropIn = Convert.ToBoolean(enumerator.Value); } else if (enumerator.Name == "ISAllowDropOut") { this.isAllowDropOut = Convert.ToBoolean(enumerator.Value); } else if (enumerator.Name == "Alignment") { this.alignment = (MenuAlignment)enumerator.Value; } else if (enumerator.Name == "MenuType") { this.menuType = (MenuType)enumerator.Value; } } }