PRINCIPLES OF PROGRAMMING LANGUAGES
PRACT. Implement static/runtime polymorphism in C#.
using System;
namespace ATC
{
public class ATC
{
void Show(int a)
{
Console.WriteLine(“int a = {0}”,a);
}
void Show(double a)
{
Console.WriteLine(“double a= {0}”, a);
}
static void Main(string[] args)
{
ATC obj = new ATC();
obj.Show(5);
obj.Show(5.5);
Console.ReadKey();
}
}
}