Managed Code and Unmanaged Code are very important in .NET technologies. This article describes the difference between Managed Code and Unmanaged Code or Managed Code VS Unmanaged Code.
Managed codes are not directly converted to machine language. After compiled all the codes are converted to an intermediate language MSIL (Microsoft Intermediate Language). CLR of .Net Framework then convert it into machine language. In short all the intermediate languages (IL) are managed code. This type of codes are written in .net language like (C#, VB.net.). CLR has full control over the source code.
Example: C#, VB codes.
Unmanaged codes are directly converted to machine language. OS can directly execute them. MSIL does not understand what it is and it cannot run under CLR. This type of codes are not written in .Net language (like C#, VB.net.). CLR does not have any control over the source code.
Example: java, C codes.