Make your own SizeControlledStack<> class, and implement it using the system's Stack<>. Then you can check if it gets too big.
↧