预处理命令
因为平时只用到了#region
和#endregion
就想查查C#中有多少预处理命令,然后查了一下Stackoverflow中有的人说这东西不好用,还不如用Conditional(“DEBUG”)
。
不管先罗列出来说不一定以后有用:
// if elseif else end
#if
#else
#elif
#endif
// define enddefine
# define
#undef
//output warning
#warning
//output error
#error
// block
#region
#endregion
// 不清楚
#line
#pragma
#pragma warning
#pragma checksum