惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

J
Java Code Geeks
I
InfoQ
阮一峰的网络日志
阮一峰的网络日志
有赞技术团队
有赞技术团队
Vercel News
Vercel News
Engineering at Meta
Engineering at Meta
Hugging Face - Blog
Hugging Face - Blog
G
Google Developers Blog
Stack Overflow Blog
Stack Overflow Blog
aimingoo的专栏
aimingoo的专栏
罗磊的独立博客
Blog — PlanetScale
Blog — PlanetScale
Microsoft Security Blog
Microsoft Security Blog
B
Blog RSS Feed
H
Help Net Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
P
Proofpoint News Feed
MyScale Blog
MyScale Blog
V
Visual Studio Blog
B
Blog
MongoDB | Blog
MongoDB | Blog
T
The Blog of Author Tim Ferriss
L
LangChain Blog
D
Docker

博客园 - Freedom

ebook site XML Namespaces and How They Affect XPath and XSLT Debugging Applications for Microsoft .NET and Microsoft Windows: Notes-Books Debugging Applications for Microsoft .NET and Microsoft Windows: Notes-Prerequisites to Debugging Debugging Applications for Microsoft .NET and Microsoft Windows: Notes-The Debugging Process NET垃圾回收机制 A Software Developer’s Reading Plan 浅析.NET中的Serialization VS 2008 常用快捷键! One Day-XML:XML Schema 参考手册 One Day-XML:XSLT One Day-XML:WAP One Day-XML:Web Services One Day-XML:WSDL One Day-XML:RDF One Day-XML:RSS One Day-XML:XForms One Day-XML:SOAP One Day-XML:XML DOM
#if (C# Reference)
Freedom · 2010-04-16 · via 博客园 - Freedom

ref:http://msdn.microsoft.com/en-us/library/4y6tbswk.aspx 

 1 // preprocessor_if.cs
 2 #define DEBUG
 3 #define MYTEST
 4 using System;
 5 public class MyClass 
 6 {
 7     static void Main() 
 8     {
 9 #if (DEBUG && !MYTEST)
10         Console.WriteLine("DEBUG is defined");
11 #elif (!DEBUG && MYTEST)
12         Console.WriteLine("MYTEST is defined");
13 #elif (DEBUG && MYTEST)
14         Console.WriteLine("DEBUG and MYTEST are defined");
15 #else
16         Console.WriteLine("DEBUG and MYTEST are not defined");
17 #endif
18     }
19 }

posted @ 2010-04-16 13:13  Freedom  阅读(523)  评论()    收藏  举报