gpt4 book ai didi

windows-phone-7 - 缺少 ApplicationException 基类?

转载 作者:行者123 更新时间:2023-12-01 10:07:25 24 4
gpt4 key购买 nike

据我所知,您应该始终在 .NET 中为您的自定义异常实现 ApplicationException 类。我最近开始开发 Windows Phone 7,但我找不到这个类。我现在应该使用不同的类(class)吗?

最佳答案

使用 Exception类代替。来自 MSDN :

If you are designing an application that needs to create its own exceptions, you are advised to derive custom exceptions from the Exception class. It was originally thought that custom exceptions should derive from the ApplicationException class; however in practice this has not been found to add significant value. For more information, see Best Practices for Handling Exceptions.

关于windows-phone-7 - 缺少 ApplicationException 基类?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9037907/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com