Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
BradAbrams
http://msdn.microsoft.com/| Developer
18 https://blogs.msdn.microsoft.com/brada/2004/01/09/whatismanagedcode/#comments
Share 0 0 0
Recently I have been working on pulling together some background information and I thought Id share it
here. I certainly dont claim any of this is news, but at least google will help me find it next time I need it
The necessary information is encoded in an Intermediate Language IL and associated metadata, or symbolic
information that describes all of the entry points and the constructs exposed in the IL e.g., methods,
properties and their characteristics. The Common Language Infrastructure CLI Standard which the CLR is the
primary commercial implementation describes how the information is to be encoded, and programming
languages that target the runtime emit the correct encoding. All a developer has to know is that any of the
languages that target the runtime produce managed code emitted as PE files that contain IL and metadata.
And there are many such languages to choose from, since there are nearly 20 different languages provided by
third parties everything from COBOL to Camel in addition to C#, J#, VB .Net, Jscript .Net, and C++ from
Microsoft.
Before the code is run, the IL is compiled into native executable code. And, since this compilation happens by
the managed execution environment or, more correctly, by a runtimeaware compiler that knows how to
target the managed execution environment, the managed execution environment can make guarantees
about what the code is going to do. It can insert traps and appropriate garbage collection hooks, exception
handling, type safety, array bounds and index checking, and so forth. For example, such a compiler makes sure
to lay out stack frames and everything just right so that the garbage collector can run in the background on a
separate thread, constantly walking the active call stack, finding all the roots, chasing down all the live objects.
In addition because the IL has a notion of type safety the execution engine will maintain the guarantee of type
safety eliminating a whole class of programming mistakes that often lead to security holes.
Contrastthistotheunmanagedworld:Unmanagedexecutablefilesarebasicallyabinaryimage,x86
code,loadedintomemory.TheprogramcountergetsputthereandthatsthelasttheOSknows.Thereare
protectionsinplacearoundmemorymanagementandportI/Oandsoforth,butthesystemdoesnt
actuallyknowwhattheapplicationisdoing.Therefore,itcantmakeanyguaranteesaboutwhathappens
whentheapplicationruns.
Tags CLR https://blogs.msdn.microsoft.com/brada/tag/clr/
Comments 18
Name *
https://blogs.msdn.microsoft.com/brada/2004/01/09/whatismanagedcode/ 1/11
3/3/2017 Whatismanagedcode?BradAbrams
Email *
Website
Post Comment
Michael Lockwood
April 10, 2004 at 10:58 pm https://blogs.msdn.microsoft.com/brada/2004/01/09/whatismanagedcode/#comment18763
What an absolutely clear, concise, and to the point explanation! Excellent.
Reply https://blogs.msdn.microsoft.com/brada/2004/01/09/whatismanagedcode/?replytocom=18763#respond
Jordan
April 16, 2004 at 10:58 am https://blogs.msdn.microsoft.com/brada/2004/01/09/whatismanagedcode/#comment19583
Nicely done.
Reply https://blogs.msdn.microsoft.com/brada/2004/01/09/whatismanagedcode/?replytocom=19583#respond
Juergen
April 28, 2004 at 12:58 am https://blogs.msdn.microsoft.com/brada/2004/01/09/whatismanagedcode/#comment20923
Great explanation, thanks!
Reply https://blogs.msdn.microsoft.com/brada/2004/01/09/whatismanagedcode/?replytocom=20923#respond
Ravindranath
May 3, 2004 at 11:56 pm https://blogs.msdn.microsoft.com/brada/2004/01/09/whatismanagedcode/#comment21393
Well done. Can this be compared to the JVM java Virtual machine ? In other words does the JVM run managed code?
Reply https://blogs.msdn.microsoft.com/brada/2004/01/09/whatismanagedcode/?replytocom=21393#respond
Abhinav Gupta
July 20, 2004 at 9:51 pm https://blogs.msdn.microsoft.com/brada/2004/01/09/whatismanagedcode/#comment26813
I wonder why MSDN dont have such a precise explanation, Excellent
Reply https://blogs.msdn.microsoft.com/brada/2004/01/09/whatismanagedcode/?replytocom=26813#respond
Peter
July 21, 2004 at 1:09 am https://blogs.msdn.microsoft.com/brada/2004/01/09/whatismanagedcode/#comment26823
Great explanation not in my 1100 pages .NET book!
Reply https://blogs.msdn.microsoft.com/brada/2004/01/09/whatismanagedcode/?replytocom=26823#respond
Mr Somewhere
July 29, 2004 at 6:51 am https://blogs.msdn.microsoft.com/brada/2004/01/09/whatismanagedcode/#comment27313
What is finally the advantage of such "code", the financial aspect "a part" ?
Reply https://blogs.msdn.microsoft.com/brada/2004/01/09/whatismanagedcode/?replytocom=27313#respond
Reply https://blogs.msdn.microsoft.com/brada/2004/01/09/whatismanagedcode/?replytocom=76403#respond
Reply https://blogs.msdn.microsoft.com/brada/2004/01/09/whatismanagedcode/?replytocom=85383#respond
Channel 9 (http://beta.channel9.msdn.com/forums/Coffeehouse/3200CansomeoneexplainManagedCodeinlaymans
terms/#CommentID=3214)
June 1, 2008 at 1:53 pm https://blogs.msdn.microsoft.com/brada/2004/01/09/whatismanagedcode/#comment91013
Oop, after writing the above I found this:
Reply https://blogs.msdn.microsoft.com/brada/2004/01/09/whatismanagedcode/?replytocom=91013#respond
Reply https://blogs.msdn.microsoft.com/brada/2004/01/09/whatismanagedcode/?replytocom=93103#respond
https://blogs.msdn.microsoft.com/brada/2004/01/09/whatismanagedcode/ 2/11
3/3/2017 Whatismanagedcode?BradAbrams
mihai (http://hpcconsulting.ro/csb/blogs/mihai/archive/2008/09/17/tutorialaspnetepisodul1.aspx)
September 16, 2008 at 3:26 pm https://blogs.msdn.microsoft.com/brada/2004/01/09/whatismanagedcode/#comment95313
Resurse pentru acest articol Enun i aici resursele asociate acestui articol: http://www.hpcconsulting http://www.hpcconsulting
Reply https://blogs.msdn.microsoft.com/brada/2004/01/09/whatismanagedcode/?replytocom=95313#respond
Reply https://blogs.msdn.microsoft.com/brada/2004/01/09/whatismanagedcode/?replytocom=100023#respond
Reply https://blogs.msdn.microsoft.com/brada/2004/01/09/whatismanagedcode/?replytocom=100513#respond
Reply https://blogs.msdn.microsoft.com/brada/2004/01/09/whatismanagedcode/?replytocom=100943#respond
Reply https://blogs.msdn.microsoft.com/brada/2004/01/09/whatismanagedcode/?replytocom=101553#respond
Reply https://blogs.msdn.microsoft.com/brada/2004/01/09/whatismanagedcode/?replytocom=105013#respond
Reply https://blogs.msdn.microsoft.com/brada/2004/01/09/whatismanagedcode/?replytocom=110573#respond
Follow Us
https://blogs.msdn.microsoft.com/brada/feed/
Popular Tags
CLR https://blogs.msdn.microsoft.com/brada/tag/clr/
Silverlight https://blogs.msdn.microsoft.com/brada/tag/silverlight/
Archives
https://blogs.msdn.microsoft.com/brada/2004/01/09/whatismanagedcode/ 3/11
3/3/2017 Whatismanagedcode?BradAbrams
Archives
April 2010 https://blogs.msdn.microsoft.com/brada/2010/04/2
March 2010 https://blogs.msdn.microsoft.com/brada/2010/03/16
February 2010 https://blogs.msdn.microsoft.com/brada/2010/02/1
All of 2010 https://blogs.msdn.microsoft.com/brada/2010/20
All of 2009 https://blogs.msdn.microsoft.com/brada/2009/108
All of 2008 https://blogs.msdn.microsoft.com/brada/2008/135
All of 2007 https://blogs.msdn.microsoft.com/brada/2007/171
All of 2006 https://blogs.msdn.microsoft.com/brada/2006/137
All of 2005 https://blogs.msdn.microsoft.com/brada/2005/244
All of 2004 https://blogs.msdn.microsoft.com/brada/2004/295
All of 2003 https://blogs.msdn.microsoft.com/brada/2003/233
https://blogs.msdn.microsoft.com/brada/2004/01/09/whatismanagedcode/ 4/11
3/3/2017 Whatismanagedcode?BradAbrams
https://blogs.msdn.microsoft.com/brada/2004/01/09/whatismanagedcode/ 5/11
3/3/2017 Whatismanagedcode?BradAbrams
https://blogs.msdn.microsoft.com/brada/2004/01/09/whatismanagedcode/ 6/11
3/3/2017 Whatismanagedcode?BradAbrams
https://blogs.msdn.microsoft.com/brada/2004/01/09/whatismanagedcode/ 7/11
3/3/2017 Whatismanagedcode?BradAbrams
https://blogs.msdn.microsoft.com/brada/2004/01/09/whatismanagedcode/ 8/11
3/3/2017 Whatismanagedcode?BradAbrams
https://blogs.msdn.microsoft.com/brada/2004/01/09/whatismanagedcode/ 9/11
3/3/2017 Whatismanagedcode?BradAbrams
https://blogs.msdn.microsoft.com/brada/2004/01/09/whatismanagedcode/ 10/11
3/3/2017 Whatismanagedcode?BradAbrams
https://blogs.msdn.microsoft.com/brada/2004/01/09/whatismanagedcode/ 11/11