using System;
namespace TestSealedClasses
{
public class Base
/*
public sealed void Show()//This Line will give an error - "cannot
{ //be sealed because it is not an override"
Console.WriteLine("This is Base Class.");
}
*/
public class Derived : Base
public void Show()
Console.WriteLine("This is Derived Class.");
public class Program
public static void Main(string[] args)
Base objBaseReference = new Derived();
//objBaseReference.Show();// Output ---------> This is Base Class.