c# attribute over main
问题 Someone asked me a question as to how we can print line no 1 line no 2 line no 3 Without changing a main method which reads static void Main(string[] args) { Console.WriteLine("line no 2"); } Now one approach was to have multiple entry points for the console application. However I tried another approach which goes as follows : class Program { [Some] static void Main(string[] args) { Console.WriteLine("line no 2"); } } class SomeAttribute : Attribute { public SomeAttribute() { Console