C# Program with "abstract keyword".
abstract class aaa
{
abstract public void sam();
}
/* class bbb:aaa //
{
} */
abstract class ccc:aaa //Correct
{
}
class ddd:aaa
{
public override void sam()
{
System.Console.WriteLine("Hello");
}
}
class psp
{
public static void Main()
{
//aaa a; //Correct
//a=new aaa(); //
ddd d =new ddd();
d.sam();
}
-------------------------------------------------------------------------
No comments:
Post a Comment