Example Code For Compile Time Polymorphism ???

Sabarimahesh
Posted by Sabarimahesh under C# category on | Points: 40 | Views : 2022
class Program

{

static void Main(string[] args)
{
Overloaded("Sabari");
Overloaded("Sabari", "Mahesh");
Overloaded("Sabari", "Mahesh ", "P M");

Console.ReadLine();
}

static void Overloaded(string value)
{

Console.WriteLine(value);

}
static void Overloaded(string value, string value1)
{

Console.WriteLine(value+value1);

}
static void Overloaded(string value, string value1, string value2)
{

Console.WriteLine(value + value1 + value2);

}


}

Comments or Responses

Login to post response