C# - 什么是一个组件,它是如何通常使用? [英] C# - What is a component and how is it typically used?

查看:207
本文介绍了C# - 什么是一个组件,它是如何通常使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是组件类,并在那里将我通常使用一个?

What is a component class and where would I typically use one?

当我在VS.NET中添加一个新的项目我的项目2008年的一个选项添加的成分。
我甚至不知道我的理解一个组成部分是什么 - 但我肯定想了解更多的关于他们的

When I add a new item to my project in VS.NET 2008 one of the options is to add a component. I am not even sure I understand what a component is - but I would sure like to find out a bit more about them.

有人能解释他们我或者指向我朝着一个在线教程,这将有助于我。

Could somebody explain them to me or perhaps point me towards an online tutorial that would help me.

推荐答案

好了,一般来说,一个组件的任何部分一个东西。特别是在.NET中,一个组件是实现 的IComponent 接口,这表明一个类可以与它的逻辑容器进行交互。

Well, generally speaking, a component is any part of a thing. Specifically in .NET, a component is a class that implements the IComponent interface, which indicates that a class can interact with it's logical container.

更多的,往往不是你在看到这个设计支持的形式,在班与他们在设计师的主持人进行互动,但是这不是一个严格的要求。

More often than not, you see this in the form of design support, in that classes interact with their host in the designer, but that's not a strict requirement.

这篇关于C# - 什么是一个组件,它是如何通常使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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