Hi, I wonder, if C#.NET is managed language, why does it produce .dll file and not some .mdll or something? Or is dll compiled to native code? Would this be even possible? I mean, to have dll witj calls to managed libraries? Thanks.
+1
A:
The library contains a header indicating that it is managed code. Also the actual machine code is produced by the JIT compiler dynamically at runtime.
Darin Dimitrov
2010-10-12 07:04:37
A:
Because the DLL actually has some unmanaged code and import table, and also because there's no need for one more file format.
As for compilation - managed assemblies are compiled to native code on computers where they are installed to GAC and loaded. Check "ngen" for more information.
Eugene Mayevski 'EldoS Corp
2010-10-12 07:05:13
+1
A:
dll is just a file extension, but the data stored inside is totally different in both managed & native.
And dll is not compiled to native code, its compiled to machine independent MSIL code.
To call the managed dll from native, you have to make your assembly COM visible.
Cheers
Ramesh Vel
2010-10-12 07:05:32