2
public partial class L2SEntity {
public void Scale(double d) {
if (this.Amount.HasValue)
this.Amount.Value *= d;
}
}
结果在以下错误:如何修改可空类型的值?
Error 2 Property or indexer 'System.Nullable<double>.Value' cannot be assigned to -- it is read only
如何更改金额的(double类型的?)值?
是不是有太多'}'现在在编辑版本? – JLWarlow 2010-08-03 14:30:56
或者一个太少''''。 :-) 更正。 – tdammers 2010-08-03 16:17:00