C#预处理命令
来源:互联网 发布:程序员 工资 编辑:程序博客网 时间:2024/05/22 05:16
1.#define 和#undefine
#define用法
#define DEBUG//告诉编译器存在给定名称的符号,但是它不是变量,不是代码的一部分,只在编译时存在
#undefined DEBUG//删除定义的该符号,如果符号不存在,则该表达式没有意义
- #define本身没有用,必须和其他的预处理命令配合使用,如#if
- #define与#undefine必须放在C#源文件的开头位置
2.#define 和#undefine
#if,#elif,#else,#endif的用法
int DoSomeWork(double x){ #if DEBUG Consol.WriteLine(x); #endif}
条件编译:
强调内容#elif=else if
3.#warning 和#error
#warning 编译,但是提醒#error 编译停在此处,提醒
4.#region 和#endregion
标记一个代码块
阅读全文
0 0
- C#预处理命令
- C#中warning预处理命令的使用
- C#中error预处理命令的使用
- 预处理命令
- #预处理命令
- 预处理命令
- 预处理命令
- 预处理命令
- 预处理命令
- 预处理命令
- 预处理命令
- 预处理命令(#,##)
- 预处理命令
- 预处理命令
- 预处理命令
- 预处理命令
- 预处理命令
- 预处理命令
- 具体剪枝算法
- map集合总结
- [NLP论文阅读]Siamese CBOW: OptimizingWord Embeddings for Sentence Representations
- Django项目中model的数据处理以及页面交互
- linux下分析Java程序内存汇总
- C#预处理命令
- 单链表中求中间节点
- Codeforces Word
- Scala的隐式参数、隐式值、隐式对象
- 为什么ConstraintLayout代替其他布局?
- 剑指offer面试题[9]-裴波那契数列
- Postman用法简介-Http请求模拟工具
- 谁说 JavaScript 简单的
- 1009. Product of Polynomials (25)