Basic .NET question

T

Tony Johansson

Hello!

I have some questions and I want to be sure about the :NET environment..

Question number 1:
Is this right C++/CLI hasn't existed until in VS++ 2005(VC8)

Question number 2:
When you compile a .NET code the .NET compiler produces Intermediate
Language(IL code) and metadata.

Question number 3:
This Intermediate Language is called managed code and can for example be an
exe file or dll file.

Question number 4:
When you execute this IL code which could be some exe file the runtime use
the Just-In_Time(JIT) compiler to produce the binary native code.

Question number 5:
Before being able to run the exe file the system must have an
CommonLangageRuntime because it's the CLR that actually runs the image code
and the .NET framework

//Tony
 
J

Jochen Kalmbach [MVP]

Hi Tony!
Is this right C++/CLI hasn't existed until in VS++ 2005(VC8)

Yes. In VC2002/2003 we had "managed C++" which had a different syntax.
But you can still use this old syntax if you specify a special
compiler-switch (/clr_old_syntax ?)

When you compile a .NET code the .NET compiler produces Intermediate
Language(IL code) and metadata.

Yes. But if you compile C++/CLI you can also embedd unmanaged code into
your C++ code. So the compiler can generate both in some cases.

This Intermediate Language is called managed code and can for example be an
exe file or dll file.
Yes.


When you execute this IL code which could be some exe file the runtime use
the Just-In_Time(JIT) compiler to produce the binary native code.

Normally, yes; but you also can "pre-jit" your code via "ngen" on the
target computer. So the jit is only done once and safed in a special
foder on the computer.

Before being able to run the exe file the system must have an
CommonLangageRuntime because it's the CLR that actually runs the image code
and the .NET framework

Yes.

--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/
 
C

Carl Daniel [VC++ MVP]

Tony Johansson said:
Hello!

I have some questions and I want to be sure about the :NET environment..

Question number 1:
Is this right C++/CLI hasn't existed until in VS++ 2005(VC8)
Yes.

Question number 2:
When you compile a .NET code the .NET compiler produces Intermediate
Language(IL code) and metadata.
Yes.

Question number 3:
This Intermediate Language is called managed code and can for example be
an exe file or dll file.

Close enough. Managed code is represented by IL and can be packaged into
EXEs and DLLs.
Question number 4:
When you execute this IL code which could be some exe file the runtime use
the Just-In_Time(JIT) compiler to produce the binary native code.

Yes. You can also use the .NET ngen utility to pre-compile the IL into a
native image that's cached by the system.
Question number 5:
Before being able to run the exe file the system must have an
CommonLangageRuntime because it's the CLR that actually runs the image
code and the .NET framework

Yes.

-cd
 
C

Carl Daniel [VC++ MVP]

Jochen Kalmbach said:
Hi Tony!


Yes. In VC2002/2003 we had "managed C++" which had a different syntax. But
you can still use this old syntax if you specify a special compiler-switch
(/clr_old_syntax ?)
/clr:blush:ldSyntax


Yes. But if you compile C++/CLI you can also embedd unmanaged code into
your C++ code. So the compiler can generate both in some cases.

....unless you're compiling with /clr:pure or /clr:safe, in which case no
unmanaged code will be emitted (and code that can only be unmanaged won't
compile).

-cd
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top