用于从派生类调用基类的方法:要编写base.<methodNam>()

class customerAccout

{

public virtual decimal calculateprice()

{//implementation

 

}

}

class goldAccount:customerAccout

{
public override decimal calculatprice()

{

return base.calculatePrice()*0.9;

}

}

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-09
  • 2022-12-23
  • 2021-10-23
  • 2022-12-23
猜你喜欢
  • 2021-12-10
  • 2021-08-11
  • 2021-11-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案