.NET 表单应用程序、DLL 或 EXE 中最适合使用什么?
我正在开发一个 .NET WINDOWS FORM 应用程序,我需要开发一个搜索模块,并且此搜索可以在许多其他应用程序中使用,
我想知道什么是最好的开发搜索:
< strong>DLL 并将其包含在应用程序
或
EXE 文件中并从其他应用程序执行它
每种方式的优点和缺点是什么???
I'm developing a .NET WINDOWS FORM Application , I need to develop a search module and this search could be used in many other applications,
i'm wondering what is best to to Develeop Search as :
DLL and include it in the Application
OR
EXE file and execute it from other applications
what is the Advantages and Disadvantages for each way????
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我会将表单放入类库中,然后将其添加为我需要的所有项目的引用。在单独的可执行文件中脱壳并执行它听起来很混乱。您还将失去与表单对象交互的能力。
I would go with putting the form in a class library and then adding it as a reference to all the projects I need it. Shelling out and executing it in a separate executable sounds messy. You also lose the ability to interact with the form object.
如果搜索模块要在许多应用程序中使用,我建议您将其创建为 DLL(类库)并从应用程序中使用它。
优点:
缺点:
If the search module is going to be used in many application, I recommend that you create it as a DLL (Class Library) and use it from the applications.
Advantages :
Disadvantages:
一般来说,最好使用 DLL 并将其添加到您的项目中作为参考。一些优点是:
Generally, it is preferred to use a DLL and add it to your project as reference. Some advantages are: