Difference between EXE and DLL

All Questions
ASP.NET
CSharp
SQL Server
WCF
HR Interview Questions
Didn't find what you are looking for? Search this
site, for frequently asked ASP.NET, C#, SQL Server, WCF
and HR Interview Questions



1. .EXE is an executable file and can run by itself as an application, where as .DLL is usullay consumed by a .EXE or by another .DLL and we cannot run or execute .DLL directly.

2. For example, In .NET, compiling a Console Application or a Windows Application generates .EXE, where as compiling a Class Library Project or an ASP.NET web application generates .DLL. In .NET framework, both .EXE and .DLL are called as assemblies.


3. .EXE stands for executable, and .DLL stands for Dynamic Link Library

If you are aware of any other differences please post them using the form below.
All Questions
ASP.NET
CSharp
SQL Server
WCF
HR Interview Questions
Didn't find what you are looking for? Search this
site, for frequently asked ASP.NET, C#, SQL Server, WCF
and HR Interview Questions

5 comments:

  1. exe has main(..), dll dont

    ReplyDelete
  2. We can make a .dll file (Including Main()),
    But can't make an exe file (without Main())

    ReplyDelete
    Replies
    1. how can we make .dll file without any supporting library. is it possible?

      Delete
  3. exe has an entry point(main).dll does not have since it is library.

    ReplyDelete
  4. 3. .DLL's can be reused, where as .EXE's cannot be reused.

    -- We can reuse EXE files if they are built using .Net Framework. But the above statement says we can not reuse.

    Check yourself. Create a console application write a public class and public method.

    Create another application (any type), add reference to the EXE file directly (Not the project reference in same solution).

    You can access all public types and members from the referenced EXE file.

    ReplyDelete

If you are aware of any other C# questions asked in an interview, please post them below. If you find anything missing or wrong, please feel free to correct by submitting the form below.

 
Disclaimer - Terms of use - Contact Us | Internet Marketing