public static void RunClient(string sample) { ResizableStack <string> s = new ResizableStack <string>(100); var items = sample.Split(' ').ToList(); foreach (var item in items) { if (item != "-") { s.Push(item); } else if (!s.IsEmpty()) { Console.Write(s.Pop() + " "); } } Console.WriteLine("(" + s.Size() + " left on stack )"); }
public ResizableStackEnumerator(ResizableStack <T> containingClassObj) { _currentIndex = containingClassObj.Size(); _containingClassInstance = containingClassObj; }