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

推荐订阅源

博客园 - 聂微东
爱范儿
爱范儿
博客园 - 三生石上(FineUI控件)
Recent Announcements
Recent Announcements
大猫的无限游戏
大猫的无限游戏
MongoDB | Blog
MongoDB | Blog
A
About on SuperTechFans
M
MIT News - Artificial intelligence
V
Visual Studio Blog
云风的 BLOG
云风的 BLOG
The GitHub Blog
The GitHub Blog
Jina AI
Jina AI
P
Proofpoint News Feed
博客园_首页
酷 壳 – CoolShell
酷 壳 – CoolShell
T
The Blog of Author Tim Ferriss
G
Google Developers Blog
宝玉的分享
宝玉的分享
Engineering at Meta
Engineering at Meta
Last Week in AI
Last Week in AI
aimingoo的专栏
aimingoo的专栏
罗磊的独立博客
N
Netflix TechBlog - Medium
人人都是产品经理
人人都是产品经理

博客园 - 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)  评论()    收藏  举报