예) Overriding과 Overloading(2)

 

 

 

 

 

class Program

{

  public static void Main()

  {

  SportsCar boxter = new SportsCar();

  boxter.Run();  //결과:  Overriding : 200km/h

  boxter.Run(250);  //결과:  Overloading : 250km/h

  }

}

 

 

 

 

 

+ Recent posts