注意下面的代码是在一个类中的单个类
private string _fee;
private string _receipt;
public string Fee
{
get { return _fee; }
private set { _fee = value; }
}
public string Receipt
{
get { return _receipt; }
private set { _receipt = value;}
}
public MyValue(string fee, string receipt) : this()
{
_fee = int.Parse(receipt).ToString();
_receipt = receipt;
}
如您所见,我的财产没有任何作用,所以我应该使用
_fee = int.Parse(fee).ToString();
_receipt = receipt;
或者
Fee = int.Parse(fee).ToString();
Receipt = receipt;