在c#.net .dll文件中是否可以创建mainfunction [英] In the c#.net .dll file is to creates with mainfunction possible or not

查看:105
本文介绍了在c#.net .dll文件中是否可以创建mainfunction的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在c#.net .dll文件中是否可以使用mainfunction创建?

在c#.net .exe文件中是否可以创建没有mainfunction?



我尝试过:



在c#.net .dll文件中创建是否可以使用main函数?

在c#.net .exe文件中是否可以创建无主函数?

In the c#.net .dll file is to creates with mainfunction possible or not?
In the c#.net .exe file is to creates without mainfunction possible or not?

What I have tried:

In the c#.net .dll file is to creates with mainfunction possible or not?
In the c#.net .exe file is to creates without mainfunction possible or not?

推荐答案

区别.NET EXE和.NET DLL之间很简单:EXE包含一个main函数而DLL不包含。

所以不,你不能把一个main放在一个DLL中,或者有一个没有一个EXE。

实际上,你可以将EXE重命名为DLL,它可以正常工作。但是,如果将DLL重命名为EXE,它将无法运行:它没有Windows执行系统查找的入口点以了解从何处开始执行。
The difference between a .NET EXE and a .NET DLL is simple: the EXE contains a main function and the DLL doesn't.
So no, you can't put a main in a DLL, or have an EXE without one.
In practice, you can rename an EXE to DLL and it will work just fine. But if you rename a DLL as an EXE it won't run: it doesn't have an entry point that the Windows execution system looks for to know where to start executing.


引用:

在c#.net .dll文件中是否可以创建mainfunction?

In the c#.net .dll file is to creates with mainfunction possible or not?

不是

Not

引用:

在c#.net .exe文件中是否可以创建没有mainfunction?

In the c#.net .exe file is to creates without mainfunction possible or not?

不是

简答:

这是一个DLL,因为没有主要功能。

这是一个EXE因为有一个主要功能。

Not
Short answer:
It is a DLL because there is no main function.
It is an EXE because there is a main function.


这篇关于在c#.net .dll文件中是否可以创建mainfunction的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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