Consider the following program.
using System; class Program//from www. j a va 2 s . co m { static void Main(string[] args) { Console.WriteLine("I am inside Main(string[] args) now"); Console.WriteLine("Calling overloaded version\n"); Main(5); } static void Main(int a) { Console.WriteLine("I am inside Main(int a) now"); } }
Although you can compile and run the preceding program, the compiler will show you warning message.