我如何从“抛出新例外”中受益?

编程入门 行业动态 更新时间:2024-10-17 21:28:01
本文介绍了我如何从“抛出新例外”中受益?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我如何受益抛出新的异常 我如何在我的项目中使用它?任何一个例子?

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[^]

更多推荐

我如何从“抛出新例外”中受益?

本文发布于:2023-11-07 10:48:33,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1566248.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:抛出

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!