标签:
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Diagnostics; using System.Threading.Tasks; namespace ConsoleApplication4 { class Program { static void Main(string[] args) { MyClass.Message("In Main function"); Function1(); Console.ReadKey(); } [Obsolete("Don‘t use Old Method!",true)] static void Function1() { MyClass.Message("In Function1"); Function2(); } static void Function2() { MyClass.Message("InFunction2"); } } public class MyClass { [Conditional("DEBUG")] public static void Message(string msg) { Console.WriteLine(msg); } } }
标签:
原文地址:http://www.cnblogs.com/heisaijuzhen/p/4496308.html