public UndoPoint(DesignerForm Designer) { IEnumerator enumerator = null; this.Stack = new ArrayList(); this.GumpProperties = (GumpProperties)Designer.GumpProperties.Clone(); try { foreach (object stack in Designer.Stacks) { GroupElement objectValue = (GroupElement)RuntimeHelpers.GetObjectValue(stack); GroupElement groupElement = (GroupElement)objectValue.Clone(); this.Stack.Add(groupElement); if (objectValue == Designer.ElementStack) { this.ElementStack = groupElement; } } } finally { if (enumerator is IDisposable) { (enumerator as IDisposable).Dispose(); } } }