我有这个错误,我想要解决.
operator '-' cannot be applied to operands of type 'decimal' and 'Systems.Collections.Generic.IEnumerable<decimal>
我的代码:
// Step 5: Retrieve MPR amount and deduct form Gross Tax Dictionary Per-Employee //Query database var taxtable = taxTableService.GetAllTaxTables(); var mprAmount = (from tt in taxtable select tt.U_MPR_amount).distinct(); Dictionary<int,decimal> paye = new Dictionary<int,decimal>(); grosstaxDictionary.ToList().ForEach(x => { var totalPAYE = x.Value - mprAmount; paye.Add(x.Key,totalPAYE); });
在我的数据库中,字段U_MPR_amount是小数,因此是x.Value.
可能是什么问题呢?任何帮助赞赏.
解决方法
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。