//判断是属于测试还是应用
//#define X
using System;
using System.Diagnostics;
namespace 新特性
{
class Person
{
// [Conditional("X")]
public void Say(){
Console.WriteLine ("该方法为调试阶段测试方法,发布以后该方法不会执行");
}
public void SayNew(){
Console.WriteLine ("1111");
}
}
class MainClass
{
public static void Main (string[] args)
{
#if X
new Person ().Say ();
#else
new Person().SayNew();
#endif
}
}
}