how to implement a pure virtual function in c#?
using System;
using System.Collections.Generic;
using System.Text;
namespace OppTest4
{
abstract class abTest
{
public abstract void a();
}
class UsesabTest : abTest
{
public override void a()
{
Console.Out.Write("a");
}
public void x()
{
Console.Out.Write("x");
}
}
class Program
{
static void Main(string[] args)
{
UsesabTest mn = new UsesabTest();
mn.a();
}
}
}
Subscribe to:
Post Comments (Atom)
0 comments
Post a Comment