Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我编写了一个存储过程,它返回一个值作为REAL数据类型,因为它引用了一些旧的数据库表。
REAL
我想将此值转换/映射到decimal?C# 中的类型。但是,我收到一个错误:
decimal?
指定的演员表无效
运行此代码时:
item.SludgeCapacity =v.Field<decimal?>("SludgeCapacity");
有人有优化的解决方案吗?
尝试
item.SludgeCapacity = Convert.ToDecimal(v.Field("SludgeCapacity"));