![]() |
| | #1 |
| Registered User Join Date: Aug 2005
Posts: 180
| Does C# compile to an exe? Also, is it possible to compile C# to a .DLL file in a way similar to C++? Last edited by thetinman; 11-12-2008 at 09:39 AM. Reason: added dll Q |
| thetinman is offline | |
| | #2 |
| Registered User Join Date: Jun 2008 Location: RING 0
Posts: 462
| Not like C++ does, but to an executable that the CLR can understand. MIL, microsoft intermediate language. Each method call is Jittered (JIT) or just in time compiled before it executes. So in order for a computer to run this it will need the .Net framework installed on the machine, luckily this is most modern microsoft machines. This is similar to the java runtime in a sense. To a user though, as long as they have the framework installed, the executable is transparent to what language it was written in and behaves like a normal program. |
| valaris is offline | |
| | #3 |
| Registered User Join Date: Aug 2005
Posts: 180
| Is the code compiled into an executable that I can click on to run? |
| thetinman is offline | |
| | #4 |
| Ex scientia vera Join Date: Sep 2007
Posts: 426
| Yes. But the executable code contained in it does not contain the instructions that do what the C# code does, not in the format the specified cpu architecture can understand at least. The code stored in the executable is run by the CLR, but yes, it does compile to an executable.
__________________ "What's up, Doc?" "'Up' is a relative concept. It has no intrinsic value." |
| IceDane is offline | |
| | #5 |
| chococoder Join Date: Nov 2004
Posts: 443
| C# code compiles to a .NET assembly. This can be an executable for use within the .NET CLR, a dll for use with the CLR, or a type library for inclusion in other .NET assemblies. If an executable, it will have a .exe extension as standard. |
| jwenting is offline | |
| | #6 | |
| /*enjoy*/ Join Date: Apr 2004
Posts: 159
| Quote:
it's possible to compile anexe with c# so excute within framework installed ? somewone have an explication please | |
| enjoy is offline | |
| | #7 |
| Rampaging 35 Stone Welsh Join Date: Apr 2007
Posts: 2,927
| No, it is not possible to compile C# so that it can run without the framework installed. C# only half compiles, the final compilation is done by the framework at runtime. This is both a good feature and a security risk. It is good because in theory as new processor technologies become available and the framework is updated, your existing applications will take advantage of these if possible. It is a security risk because anyone that makes half an effort can extract your source code from the executable.
__________________ He is free, you say. Ah! That is his misfortune… These men… [have] the most terrible, the most imperious of masters, that is, need. … They must therefore find someone to hire them, or die of hunger. Is that to be free? - Simon Linguet |
| abachler is offline | |
| | #8 | |
| Registered User Join Date: Aug 2008
Posts: 188
| Quote:
| |
| bling is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Compile crashes certain windows | Loduwijk | C++ Programming | 5 | 03-26-2006 09:05 PM |
| No compile time errors, exe crashes. | RealityFusion | C++ Programming | 13 | 09-06-2005 12:34 PM |
| open scene graph compile issues | ichijoji | Game Programming | 1 | 08-04-2005 12:31 PM |
| compile program? | Goosie | C++ Programming | 9 | 06-22-2005 02:26 PM |
| dvv-cpp not able to compile? | Rune Hunter | C++ Programming | 12 | 10-23-2004 06:36 PM |