Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is C# interpreted or compiled?

Tags:

c#

I thought that C# generated compiled code (by JIT), but I have lately discovered that I can edit code while debugging mode in C# (VS 2008). Does that mean that C# is interpreted?

like image 271
Betamoo Avatar asked May 05 '10 22:05

Betamoo


People also ask

What is C used for?

C programming language is a machine-independent programming language that is mainly used to create many types of applications and operating systems such as Windows, and other complicated programs such as the Oracle database, Git, Python interpreter, and games and is considered a programming foundation in the process of ...

What is C language?

C is a structured, procedural programming language that has been widely used both for operating systems and applications and that has had a wide following in the academic community. Many versions of UNIX-based operating systems are written in C.

Is C -- a coding language?

C is a powerful general-purpose programming language. It can be used to develop software like operating systems, databases, compilers, and so on.


2 Answers

It's a trick. The C# compiler/debugger/IDE is just smart and can compile code on the fly while you're debugging.

like image 79
Greg Hewgill Avatar answered Oct 31 '22 16:10

Greg Hewgill


C# is compiled to IL which is then JIT'ed at runtime into instructions specific to the processor the program is running on.

Editing code while debugging C# is a feature of VS2008 which more than likely compiling any changes in the background

like image 45
Peter McG Avatar answered Oct 31 '22 18:10

Peter McG