How to Overload Main method

Omniitstudent
Posted by Omniitstudent under C# category on | Points: 40 | Views : 2493
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication28
{

class Program
{
static void Main(int x)
{
Console.WriteLine("Overloaded Main Method: x value is {0}", x);
}
static void Main(float y)
{
Console.WriteLine("Overloaded Main Method: y value is{0}", y);
}
static void Main(string[] args)
{
Console.WriteLine("Main Method");
Main(100);
Main(20.56f);
Console.ReadLine();
}

}


}
crazy code..

Comments or Responses

Login to post response