public decimal CalculateCost()
{
return 0;
}
public void SetHealthyOption(bool healthy)
{
if (healthy == true) {
CalculateCost = (CalculateCost() - NumberOfPeople * 20 + NumberOfPeople * 5) * 0.95m;
}
}
我开始以为是因为我没有打括号但是左边加了括号也没有用,那为什么右边加括号又可以看做一个值呢?