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
I think Ilya Ivanov's answer is possibly the best one. However consider mine as a funny answer too:
public class Program
{
static Program()
{
Console.WriteLine("line no 1");
Console.WriteLine("line no 2");
Console.WriteLine("line no 3");
Environment.Exit(0);
}
static void Main(string[] args)
{
Console.WriteLine("line no 2");
}
}