Is C# is a compilar or interpreter?
How to differentiate these two?
Thanks inadvance
Is C# is a compilar or interpreter?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Pravin MoreRank #1,419 · 1.2K reputationPosted Oct 31, 2011, 4:58 AM EDT
see,a compiler translates from one language to another language. Since a JIT compiler receives an IL as its input and outputs native machine binary, it easily fits this criteria and should be called a compiler i think. n one more thing is ,JIT compiler produces binary machine codes translating block source code. Interpreter translates line by line......so JIT is Compilar.
Thanks,
Pravin.
VulpesRank #55 · 29.2K reputationPosted Oct 31, 2011, 5:31 AM EDT
As Pravin also said, an interpreter translates each line of source code to native code and then executes that. It will still do this even if a line has been translated previously.
In contrast, the JIT compiler compiles a method to native code the first time it is called and caches the native code. If the method is called again, the native code is obtained from the cache rather than being generated afresh.