Tips and Tricks to Developing Managed Code
Managed code solves several of the problems inherent with programming in native code, and it takes care of many of the "house-keeping" aspects associated with programming in native code. Yet, the way that you implement managed code can make a significant difference in the performance and robustness of your finished application.
Please refer to the Windows Mobile Developer Wiki for information on optimizing the performance of your managed code.
Although FxCop is being phased out, and although many of the warnings and errors it reports are not strictly relevant to Windows Mobile, it is still a very useful tool for uncovering bad programming practices in your Managed Code. For more information on FxCop, please see the GotDotNet web site.
Visual Studio supports breakpoints, and many other advanced debugging features. However, it can be occasionally useful to have a simple text string sent to the IDE's Output window.
To display text as your application is running, add the following line to the top of your application:
Then include the following line in your application, when you need to see output.
Ensure that the Output tab is active - select Output from the View menu if it is not.