Bug 程序缺陷
debug 调试
编译器直接处理预处理
- #define Debug
- #define Release
- #undef Debug
- //#undef Release
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace DefineTest
- {
- class Program
- {
- static void Main(string[] args)
- {
- #region 可以折叠
- #if Debug && Release==false
- Console.WriteLine("only debug");
- #elif Debug &&Release
- #error "不能同时出现debug和release"
- Console.WriteLine("debug and Release");
- #elif (!Dubeg)&&Release
- Console.WriteLine("only release");
- #else
- Console.WriteLine("no debug no release");
- #endif
- #if Release
- Console.WriteLine("release");
- #endif
- #endregion
- #line 200
- #warning "这段话不能删除"
- #warning "这段话不能删除"
- #line default
- #warning "这段话不能删除"
- #warning "这段话不能删除"
- #pragma warning disable
- int a = 9;
- int b = 13;
- #pragma warning restore
- int[] my;
- Console.ReadKey();
- }
- }
- }