加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

如何在VB.NET中继承类

发布时间:2020-12-17 07:24:04 所属栏目:百科 来源:网络整理
导读:我是VB的新手,我想从DataGridView继承,我使用类似的东西 Public Class DataGridViewEx Inherits DataGridViewEnd Class 但编译器会生成错误,因为End of statement需要指向Inherits DataGridView.有什么不对,我应该怎么做? 解决方法 把它放在下一行: Public
我是VB的新手,我想从DataGridView继承,我使用类似的东西

Public Class DataGridViewEx Inherits DataGridView
End Class

但编译器会生成错误,因为End of statement需要指向Inherits DataGridView.有什么不对,我应该怎么做?

解决方法

把它放在下一行:

Public Class DataGridViewEx 
    Inherits DataGridView
End Class

MSDN: Inherits

If used,the Inherits statement must be the first non-blank,non-comment line in a class or interface definition. It should immediately follow the Class or Interface statement.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读