kaveer
8/23/2016 - 7:06 AM

Overloading Methods

Overloading Methods

//Overloading is primarily useful when you need to perform the same operation on different data types //or varying groups of information

static void Main()
{
Console.WriteLine(“The answer is “); //Overload method to accept string datatype as argument
Console.WriteLine(42); // Overload method to accept integer as argument
}