如何将多个exe结合在一起 [英] how to combine multiple exe togather

查看:98
本文介绍了如何将多个exe结合在一起的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!


我有五个应用程序
main_app
one_app
two_app
three_app
four_app
Five_app
这五个应用程序都是单独的

我想将四个应用程序添加到main_app

多数民众赞成在我已经完成,我将他们的exe添加到main_app

现在,当main_app将在其上运行时,我为每个应用都有四个按钮

当我单击button1时,app_one将打开直到完成

现在,如果我想将数组字符串传递给任何应用程序,我该怎么做

hi to all!


i have five applications
main_app
one_app
two_app
three_app
four_app
five_app
all five applications are seperate

i want to add four app to main_app

thats i have done i added their exe to main_app

now when main_app wll run over ther i have four buttons for each app

when i click button1 the app_one will open till its done

now if i want to pass array string to any app how i have to do it

推荐答案

简单:停止执行所有操作!

将所有程序集转换为类库,并在主应用程序中全部使用它们.您可以在属性中更改应用程序的输出类型,将其更改为类库".但这一点都不重要.任何EXE都可以被其他程序集引用,就像它是DLL一样.通过使用public访问修饰符,仅使您需要的所有内容在实际运行该程序的主机中可见. (不要过分发布",仅将public用作其他程序集真正使用的内容!这不提供任何保护,仅为您的方便起见并防止意外错误.)

这不仅是正确,最可维护的方法,而且也是最简单的方法.编译器和Interllisense将为您提供所有帮助,就像所有引用的程序集都是一个程序集一样,没有麻烦.

—SA
Simple: stop doing all that!

Convert all your assemblies to class libraries and use them all in main application. You can change application''s output type in properties, change it to "Class Library". But this is not important at all. Any EXE could be referenced by other assembly as if it was DLL. Only make all you need to be visible by main assembly actually running the process — by using public access modifier. (Don''t "over-publish", make public only what is really used by other assembly! This does not provide any protection, is done just for your convenience and prevention of accidental mistakes.)

Not only this is the right and most maintainable way, it is also the easiest. The compiler and Interllisense will give you all assistance as if all referenced assemblies were the one assembly, no hassles.

—SA


这篇关于如何将多个exe结合在一起的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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