Senior .Net Developer Question:

Download Job Interview Questions and Answers PDF

Tell us the difference between managed and unmanaged code?

Senior .Net Developer Interview Question
Senior .Net Developer Interview Question

Answer:

Managed code is a code created by the .NET compiler. It does not depend on the architecture of the target machine because it is executed by the CLR (Common Language Runtime), and not by the operating system itself. CLR and managed code offers developers few benefits, like garbage collection, type checking and exceptions handling.

On the other hand, unmanaged code is directly compiled to native machine code and depends on the architecture of the target machine. It is executed directly by the operating system. In the unmanaged code, the developer has to make sure he is dealing with memory usage and allocation (especially because of memory leaks), type safety and exceptions manually.

In .NET, Visual Basic and C# compiler creates managed code. To get unmanaged code, the application has to be written in C or C++.

Download Senior .Net Developer Interview Questions And Answers PDF

Previous QuestionNext Question
Do you know what is .NET Standard?Please explain what inheritance is, and why it’s important?