更好的做法是在C#中将自定义异常作为一个单独的项目,或者应该包含在同一个项目中 [英] Is the better practice to have a custom exception in C# as a seperate project or should be included in the same

查看:61
本文介绍了更好的做法是在C#中将自定义异常作为一个单独的项目,或者应该包含在同一个项目中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在c#asp.net项目中创建我的例外,其中我有多个项目。我的目的是在asp.net解决方案中创建一个新的异常策略作为一个单独的项目,或者它应该在一个单独的文件夹中的同一个项目中。



我尝试了什么:



任何人都可以建议我这个

解决方案

<的最佳选择blockquote>如果您认为您将在另一个项目中使用自定义例外,则应将它们分隔到另一个项目中。如果你只为你的一个项目使用它们并不重要。这取决于你的编码风格。


I want to create my exceptions in c# asp.net project in which I am having multiple projects. My intention is to create a new exception policy as a separate project in the asp.net solution or it should be in the same project in a separate folder.

What I have tried:

Can anybody suggest me the best choice for this

解决方案

If you think you will use custom exceptions in another project you should seperate them to another project. If you use them just for your one project it doesn't matter. It depends your coding style.


这篇关于更好的做法是在C#中将自定义异常作为一个单独的项目,或者应该包含在同一个项目中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆