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

推荐订阅源

D
Docker
爱范儿
爱范儿
Vercel News
Vercel News
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Martin Fowler
Martin Fowler
博客园 - 司徒正美
大猫的无限游戏
大猫的无限游戏
酷 壳 – CoolShell
酷 壳 – CoolShell
T
Tailwind CSS Blog
Blog — PlanetScale
Blog — PlanetScale
博客园 - 【当耐特】
人人都是产品经理
人人都是产品经理
F
Fortinet All Blogs
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - Franky
T
The Blog of Author Tim Ferriss
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google DeepMind News
Google DeepMind News
H
Help Net Security
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
G
Google Developers Blog

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