.net中的whati是什么? [英] whati is component in .Net?

查看:95
本文介绍了.net中的whati是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友,


什么是组件,在.Net中我们称之为组件的是什么?

正在等待专家的良好回答

hi friends,


what is component and which thing we call it Component in .Net?

am waiting for good answer from experts

推荐答案

尽管我不是专家,但我正在为您发布一些信息-

组件是从.NET项目构建的一种特殊类型的可执行文件.编译后,组件通常由需要该组件提供的服务的应用程序引用.在许多.NET Web环境中,组件在Web服务器上运行并提供数据和服务器上运行的Web服务的其他服务(例如安全性,通信和图形).在Windows Form应用程序中,.NET组件的作用与Web服务器上的作用相同,但规模较小.
.NET组件提供了一个可编程接口,供消费者应用程序(通常称为客户端应用程序)访问.组件接口由组件中包含的类公开的许多属性,方法和事件组成.换句话说,组件是支持该组件提供的服务的一组编译类.这些类通过构成组件接口的属性,方法和事件来公开其服务.

简单的.NET面向对象编程只涉及创建一个类,添加该类所需的属性,方法和事件,以及将该类包含在不同的应用程序中.但是,.NET组件是具有.DLL(动态链接库)扩展名的预编译类模块.在运行时,将调用.NET组件并将其加载到内存中,以供某些使用者应用程序使用.这些.NET组件通常是作为独立的.NET项目构建和测试的,不一定是另一个项目的一部分.编译成.NET DLL后,可以将这些组件作为插件服务提供程序添加到许多.NET应用程序中.
每个.NET DLL组件可能包含多个类.这意味着每个DLL都可以公开一个或多个类.例如,如果您构建一个支持远程数据访问的.NET DLL,则该DLL可能需要公开数据库的单独类以及该DLL也产生的各种数据集的类.或者,您可能只有一个DLL,支持您的应用程序中的错误处理.在这种情况下,DLL公开了一个ErrorHandler类,该类执行使用者应用程序所需的所有错误处理."


在此处的更多信息 http://msdn.microsoft.com/en-us/library/ms973807.aspx [ ^ ]

除此之外,建议您应该自己进行研究. CP不鼓励用勺子喂食.
Although I am not an expert , I am posting some information for you -

"A component is a special type of executable built from a .NET project. After compilation the component is typically referenced by applications needing the services provided by the component. In many .NET Web environments, components run on the Web server and provide data and other services (such as security, communications, and graphics) to the Web Services operating on the server. In a Windows Form application a .NET component performs the same role as on a Web server, but on a reduced scale.

.NET components provide a programmable interface that is accessed by consumer applications (often called client applications). The component interface consists of a number of properties, methods, and events that are exposed by the classes contained within the component. In other words, a component is a compiled set of classes that support the services provided by the component. The classes expose their services through the properties, methods, and events that comprise the component''s interface.

Simple .NET object-oriented programming involves not much more than creating a class, adding the properties, methods, and events required by the class, and including the class in different applications. A .NET component, however, is a pre-compiled class module with a .DLL (dynamically-linked library) extension. At run time, a .NET component is invoked and loaded into memory to be used by some consumer application. These .NET components are most often built and tested as independent .NET projects and are not necessarily part of another project. After compilation into a .NET DLL, these components can be added to many .NET applications as plug-in service providers.

Each .NET DLL component may contain multiple classes. This means that each DLL may expose a single class or a variety of classes. For instance, if you build a .NET DLL that supports remote data access, the DLL might need to expose separate classes for the database and for the variety of DataSets also produced by the DLL. Or, you may have a single DLL that supports error handling in your applications. In this case, the DLL exposes a single ErrorHandler class that performs all of the error handling required by consumer applications."


More info here http://msdn.microsoft.com/en-us/library/ms973807.aspx[^]

Other then this, the suggestion is that you should do your research on your own. CP does not encourage spoon feeding.


这篇关于.net中的whati是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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