.net后台给对象某int类型字段赋值null时报错,提示无法确定条件表达式的类型,因为"“和"int"之间没有隐式转换,图示如下:
解决办法:
加上代码 int? IntNull = null;
然后IntNull替代null;
其他报错如 无法确定条件表达式的类型,因为”"和"decimal"之间没有隐式转换:
解决方法类似:
加上代码 decimal? DecimalNull = null;
然后DecimalNull 替代null;
.net后台给对象某int类型字段赋值null时报错,提示无法确定条件表达式的类型,因为"“和"int"之间没有隐式转换,图示如下:
解决办法:
加上代码 int? IntNull = null;
然后IntNull替代null;
其他报错如 无法确定条件表达式的类型,因为”"和"decimal"之间没有隐式转换:
解决方法类似:
加上代码 decimal? DecimalNull = null;
然后DecimalNull 替代null;