在C#中,我可以抛出一个溢出异常:
throw new System.OverflowException("Cannot push onto a full stack.");
如何抛出下溢异常?
throw new System.UnderflowException("Cannot pop from an empty stack.");
看起来UnderflowException
不是System
的一个方法。
-1
。 - theonlygusti