Are code contracts supported in .net core?

我只是一个虾纸丫 提交于 2021-01-27 13:11:07

问题


In the .net framework there were Code Contracts which allowed me to specify pre/post conditons in my code. Are they supported in .net core/.net 5?


回答1:


Namespace System.Diagnostics.Contracts is available but project is abadoned.

Alternative VS2019
https://softwarerecs.stackexchange.com/questions/47108/the-best-code-contracts-alternative-for-vs-2017-2019-and-net-core-projects

Discussion about .Net Core

https://github.com/dotnet/runtime/issues/23869

Is Code Contracts still the recommended way to go in 2020

https://github.com/dotnet/docs/issues/17640



来源:https://stackoverflow.com/questions/64985444/are-code-contracts-supported-in-net-core

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!