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

编程入门 行业动态 更新时间:2024-10-26 16:30:00
本文介绍了在c# .dll文件中是否可以创建mainfunction的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在c# .dll文件中是否可以使用mainfunction创建? 在c# .exe文件中是否可以创建没有mainfunction? 我尝试过: 在c# .dll文件中创建是否可以使用main函数? 在c# .exe文件中是否可以创建无主函数?

In the c# .dll file is to creates with mainfunction possible or not? In the c# .exe file is to creates without mainfunction possible or not? What I have tried: In the c# .dll file is to creates with mainfunction possible or not? In the c# .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# .dll文件中是否可以创建mainfunction?

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

不是

Not

引用:

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

In the c# .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

本文发布于:2023-11-06 22:25:49,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1564842.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文件   net   dll   mainfunction

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!