什么是运行时检查的条件编译符号“pre and post”和 [英] What is conditional compilation symbol for runtime checking "pre and post"

查看:140
本文介绍了什么是运行时检查的条件编译符号“pre and post”和的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Visual Studio 2010 .NET 3.5项目的代码约定。 我也使用R#。 因此,我必须定义条件编译符号CONTRACTS_FULL,以便我的Contract.Requires等调用不被忽略。 我为调试版本设置了这个
条件编译符号。


对于版本构建,我想将它们设置为"pre and post"和而不是"完整"。 什么是条件编译符号?

解决方案

嗨罗宾,


参见此讨论:


http://social.msdn.microsoft.com/Forums/en-US/codecontracts/thread/5d64b302-a240-4340-8b34-496c5eec32e4


- 戴夫


I am using Code Contracts with a Visual Studio 2010 .NET 3.5 project.  I also use R#.  As a result I have to define the conditional compilation symbol CONTRACTS_FULL in order for my Contract.Requires, etc. calls to not be ignored.  I set this conditional compilation symbol for debug builds.

For release builds I want to set them for "pre and post" rather than "full".  What is the conditional compilation symbol for that?

解决方案

Hi Robin,

See this discussion:

http://social.msdn.microsoft.com/Forums/en-US/codecontracts/thread/5d64b302-a240-4340-8b34-496c5eec32e4

- Dave


这篇关于什么是运行时检查的条件编译符号“pre and post”和的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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