how to implement a pure virtual function in c#?

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();
}
}
}

0 comments:

Post a Comment