我正在尝试开发一个简单的Swift应用程序来计算增值税(增值税= 20%)。
func taxesFree(number: Int) -> Double {
var textfield = self.inputTextField.text.toInt()!
let VAT = 0.2
var result = textfield * VAT
return result
}
因为某种原因我一直在
二进制运算符*不能应用于Int和Double类型的操作数
在线上
var result = textfield * VAT
我有一个名为.cs的ModelDonation.cs文件,它包含3个类。一个是我的基类,我希望从它继承其他类。然后,我有两个从基类继承的类。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace GiftAidCalculator.TestConsole
{
abstract class Donation
{
private decimal DonationAmountTotal;
public virt