预处理指令

预处理指令,编写位置之后有效。
 
区域指令
#region
#endregion
 
预定义
#define Debug
 
取消预定义
#undef Debug
 
条件预处理指令
#if
#elif
#else
#endif
 
警告预处理指令
#warning here is a warning
错误预处理指令
#error here is an error
 
行数预处理指令
#line 200 "Filename"
#line default 
 
自定义预处理指令
#progma warning disable 414, 3021
//禁用3021warning,
//对应类前加
[CLSCompliant(false)]
 
和校验
#progma checksum "filename" "guid" "bytes"

 

posted @ 2017-08-25 11:56  sunlyk  阅读(158)  评论(0编辑  收藏  举报