Designing .NET Class Libraries: API Usability

“Managed code” is one of the most important progresses between .Net Framework and VC++. Althouth you can know about how efficiency and how productivity the “managed code” is. but how to proof the efficiency and productivity?

How efficiency?
In this link, Brad Abrams and Anders Hejlsberg describe the importance of Managed Code. They are taking about lots pregress in managed code, for example: gabage collection, buffer over flow even more you don’t have to write addtional destructor for a object, because GC (gabage collection) will help you to automatically destroy this object.

What’s different between Managed code and Native code?
**The most different between managed code and unmanaged (native) code is “Managed extension”. Use managed extension is not a easy thing for me, you can refer Richard Grimes’s article in Visual C++ magazine “
Feel at Home with Managed Extensions**” (mm.. I think maybe this article can not find in WWW just check out the old magazine January 2001). This article tell the basically how to use “managed extension”, and let you code from native code to managed code. If you can not find this article, maybe you can try his book “Programming with Managed Extensions for Microsoft Visual C++ .NET”.

**Want some pratice about manage code?
**Want a example for how managed code work, or how to make your native code into managed code? I think the Quake2 source code is a good practice to know how managed extension work. You can reference the CodeProject article Quake II .NET, they are taking lot of way to port the source code from C into C++ even into managed C++ code. This is a good example to know how they work both in managed or native C++. In this article, they even make installation file to let you test your output executable (real game in quake2).

**How managed C++ to C#?
**Perhaps you already know what managed c++ is and have already write lots code. But how to let managed C++ code into C#? Stoyan Damov write an article about .NET Dynamic Software Load Balancing, he also mention about Some thoughts about MC++ and C# . This is very useful when we want to transfer out managed C++ into C#.


Evan

Attitude is everything