예제) 인터페이스(2)

 

 

 

class FlyingSportsCar : SportsCar, IFly

{

  public void Fly()

  {

  Console.WriteLine("Fly~~~");

  }

}

class Program

{

  public static void Main()

  {

  FlyingSportsCar a=new FlyingSportsCar();

  a.Fly();

  }

}

 

 

 

 

 

 

 

+ Recent posts