窗体不是一个控件吗?
昨天有人指出 Form 不是控件。是这样吗?它继承了像 ClientSize 这样的属性,其描述清楚地表明它确定了控制区域等。 或者只是 MSDN 不准确?
Well yesterday somebody noted that Form is not a control. Is that right? It inherits the properties like ClientSize which description clearly says it determines the area of control etc.
Or is it just MSDN being non accurate?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
根据 MSDN 的继承层次结构:
这包括 < code>System.Windows.Forms.Control,因此它派生自
Control
。或者你的意思是“不是控件”的其他定义?Inheritance hierarchy according to MSDN:
This includes
System.Windows.Forms.Control
, so it derives fromControl
. Or do you mean some other definition of "not a control"?“不是控件”是什么意思?如果您查看 MSDN 文档,就会清楚地看到显示它(间接)派生自 System.Windows.Forms.Control...
What do you mean by "is not a control"? If you looks at the MSDN documentation it clearly shows that it derives (indirectly) from System.Windows.Forms.Control...
继承层次结构另有说明。 (除非他们不遵循继承的“是”规则,但我在这里没有看到这个问题。如果是这样的话,他们可能几年前就已经被叫出来了。)
The inheritance hierarchy indicates otherwise. (Unless they're not following the "is a" rule for inheritance, but I don't see that problem here. They'd probably have been called out on that years ago if that were the case.)
这实际上是一个如何定义“控制”的问题。
This is really a matter of how you define 'control'.