/// <summary> /// Pops the items from the stack and places them in their own stack /// </summary> /// <param name="PopCount"></param> /// <returns></returns> public ExStack <T> PopStack(int PopCount) { // create a new stack ExStack <T> stack = new ExStack <T>(PopCount); for (int i = 0; i < PopCount; i++) { stack.Push(this.Pop()); } stack.Reverse(); return(stack); }