Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
VS 2010中使用C#和Web 服务作为后端的Win 表单应用程序
当发生任何类型的异常时如何返回窗口形式
异常发生在另一个类中的函数中,我想要的只是在发生异常后跳出所有内容而不执行任何操作
只是不要在任何地方捕捉到异常,除了你的表单......
void FunctionInForm() { try { LogicLayer.DoStuff(); //This function and any function it calls should not handle exceptions } catch { //an exception occured, and you are back in your form } }