使用了 throw 關(guān)鍵字,但在同一行內(nèi)沒有緊接一個表達式。一個 throw 語句由兩部分組成:throw 關(guān)鍵字,后面緊跟待拋出的表達式。例如;
if (denominator == 0) { throw new DivideByZeroException(); }
不能將這兩個組件分成兩行。
要改正此錯誤
請確保 throw 關(guān)鍵字和待拋出的表達式在同一行。
Error 對象 | throw 語句 | try...catch 語句
© 2001 Microsoft Corporation. 保留所有權(quán)利。