Basic .NET question

  • Thread starter Thread starter Tony Johansson
  • Start date Start date
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
 
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/
 
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
 
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:oldSyntax


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
 
Back
Top