Calling native code from C#

If you are like me, you like optimizing and profiling your code making it as fast as possible. However, at one point you might realize the C# language does not give you the best performance for whatever the purpose of your code is. Since C# is running in the Common Language Runtime (CLR), there is a larger overhead between what the machine is doing and what your code is doing. It is therefore necessary to go a language of lower level. In my case, I went to C++. C++ is compiled into assembly code when compiled, making it a low-level language. You can also go deeper if the C++ code does not give the desired performance. However, if the code you want to have in C++ contains just a few lines of code, it could in fact be a better way to keep it in C#.

Soon Windows 7

It’s now two days until the final version of Windows 7 gets released. In the meantime, I’ve been testing Windows 7 Beta and the Release Candidate. The new version will probably leak out to the piracy networks about two to three hours after Microsoft released the new Windows version. I really can’t wait. One of the things I’m excited about, is: Is there a new user-interface? What changes has been made? What is the new icons? Also, I’m wondering if they have changed something more at the taskbar.