生成vb.net时出错 [英] Error in casting vb.net

查看:70
本文介绍了生成vb.net时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



你知道如何解决这个问题吗?



错误:

无法将类型为''System.Windows.Forms.DataGridViewTextBoxCell''的对象输入''System.Windows.Forms.Control''。





谢谢!

Hi All,

Do you know how to fix this?

Error:
Unable to cast object of type ''System.Windows.Forms.DataGridViewTextBoxCell'' to type ''System.Windows.Forms.Control''.


Thank you!

推荐答案

看看此类的继承表 [ ^ ]。 DataGridViewTextBoxCell 不会从 Control 继承,所以你不能这样做。
Look at the inheritance table for this class[^]. The DataGridViewTextBoxCell does not inherit from Control so you cannot cast it so.


这篇关于生成vb.net时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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