本文介绍了我如何从“抛出新例外”中受益?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何受益抛出新的异常 我如何在我的项目中使用它?任何一个例子?
How I can benefit From "Throws a new exception" How i can use it in my projects ? any example ?
推荐答案当你检测到你的应用程序中的问题时,你可以使用它,以及如何向代码的其他部分指出它可以处理它,或者导致它你的程序退出并告诉用户 - 这样错误不会导致他的数据被破坏。 试试这里:msdn.microsoft/en-us/library/vstudio/fk6t46tz.aspx [ ^ ] - 它解释了原因,并给出了一个例子。 You use it when you detect a problem in your application and what to indicate it to some other part of your code that can handle it, or cause your program to exit and tell the user - so that the error does not cause his data to be corrupted. Try reading here: msdn.microsoft/en-us/library/vstudio/fk6t46tz.aspx[^] - it explains why, and gives an example. 有你朋友的名字是GOOGLE。经常访问他,你的问题将得到解答。这里有一些链接 http:// msdn.microsoft/en-us/library/ms173163.aspx [ ^ ] stackoverflow/questions/2999298/difference-between-throw-and-throw-new-exception [ ^ ] there is friend of your's his name is GOOGLE. Pay him frequent visits and your question will be answered. here are some links msdn.microsoft/en-us/library/ms173163.aspx[^] stackoverflow/questions/2999298/difference-between-throw-and-throw-new-exception[^]
更多推荐
我如何从“抛出新例外”中受益?
发布评论