예제) 추상 클래스 사용하기(1)

 

 

 

 

 

using System;

abstract class Car

{

public virtual void Run() {} 

}

 

abstract class SportsCar : Car

{

  public virtual void FastRun() {}

}

 

class Boxter : SportsCar{

  public override void Run(){

  Console.WriteLine(“100km/h");

  }

}

 

 

 

+ Recent posts