SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can anyone explain the difference between unmanaged code and managed code?

share|improve this question
up vote 7 down vote accepted

This is not a SharePoint question, but anyways, here's a real quick intro:

Unmanaged code: This is code that is compiled directly to machine code using native languages (C++, VB etc). The reason it is called unmanaged code is that your application is responsible for resource management (memory, handles etc). This is typically what we call a Win32 application.

Managed code: Managed code are code compiled to an intermediate byte code, which (normally) during runtime are JIT (Just In Time) compiled into machine code. The reason it is called managed code is that it has built-in functionality for memory management and garbage collection. This is what the Microsoft .NET Framework is (or Java for that matter).

share|improve this answer
Thanks. I can now relate this with sand box solution (which does not allow to run unmanaged code.) – Regmi Sep 23 '11 at 5:56
+1 for being meta expressive :D – Falak Mahmood Sep 23 '11 at 10:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.