using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AbstractClassInterfaceCalled
{
abstract class Demo
{
static Demo()
{
Console.WriteLine("static constructor Demo");
}
public Demo()
{
Console.WriteLine("public constructor Demo");
}
public void Show()
{
Console.WriteLine("Abstract class Show method");
}
}
class Program : Demo
{
static void Main(string[] args)
{
Program p = new Program();
p.Show();
Console.ReadLine();
}
}
}
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AbstractClassInterfaceCalled
{
abstract class Demo
{
static Demo()
{
Console.WriteLine("static constructor Demo");
}
public Demo()
{
Console.WriteLine("public constructor Demo");
}
public void Show()
{
Console.WriteLine("Abstract class Show method");
}
}
class Program : Demo
{
static void Main(string[] args)
{
Program p = new Program();
p.Show();
Console.ReadLine();
}
}
}
output:-
static constructor Demo
public constructor Demo
Abstract class Show method
No comments:
Post a Comment