What is the difference between managed and unmanaged code?
Answer Posted / sudhir singh
MANAGED CODE is what Visual Basic .NET and C# compilers create. It runs on the CLR (Common Language Runtime), which, among other things, offers services like garbage collection, run-time type checking, and reference checking. So, think of it as, "My code is managed by the CLR."
Visual Basic and C# can only produce managed code, so, if you're writing an application in one of those languages you are writing an application managed by the CLR. If you are writing an application in Visual C++ .NET you can produce managed code if you like, but it's optional.
UNMANAGED CODE compiles straight to machine code. So, by that definition all code compiled by traditional C/C++ compilers is 'unmanaged code'. Also, since it compiles to machine code and not an intermediate language it is non-portable.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Will c# 3.0, vb.net 9.0, atlas, or linq be included in the .net framework 3.0?
What is the .net framework 3.0 (formerly winfx)?
What are the new features 3.5 framework against with the tool?
List out few different return types of a controller action method?
What is renderbody?
What are the 2 ways of adding constraints to a route?
What are authentication filters in web api?
What is the use of action filters in an mvc application?
Which approach provides better support for test driven development - asp.net mvc or asp.net webforms?
Is it possible to unit test an mvc application without running the controllers in an asp.net process?
What is route config?
What is the use .glimpse in mvc?
Explain .Net Framework? Why we use it?
What is meant by tempdata in mvc?
What is viewstart page in mvc?