aspx页面中的转换错误 [英] Conversion Error in aspx page

查看:63
本文介绍了aspx页面中的转换错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无法将类型"system.collection.generic.ilist< bo.slabconsumptiondetails>"隐式转换为system.collections.generic.ilist< object>存在显式转换(是否缺少转换)

cannot implicitly convert type "system.collection.generic.ilist<bo.slabconsumptiondetails> to system.collections.generic.ilist<object> an explicity conversion exists(are you missing a cast)

推荐答案

该错误消息非常清楚,并且确实包含有关操作的说明.

您试图将泛型集合分配给显式定义的集合,并且编译器希望确保您知道自己在做什么.要么强制转换集合(它表示存在转换),要么更改您要分配到的变量的定义以匹配要分配的类型.
The error message is fairly clear, and does include instructions on what to do.

You are trying to assign a generic collection to a explicitly defined collection and the compiler wants to be sure you know what you are doing. Either cast the collection (it says a conversion exists), or change the definition of the variable you are assigning into to match the type being assigned.


这篇关于aspx页面中的转换错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆