Summary

This chapter explains how to test and debug your applications and offers strategies for catching errors and fixing bugs. It describes the tools and features available to you in Visual Studio 2005 and .NET Compact Framework 2.0, and it discusses best practices you can use to design solutions with managed languages such as C# and Visual Basic. The main points of advice to take away are the following:

  • Use the compiler to its fullest so that you can catch potential errors very early.

  • Never swallow exceptions.

  • Never let an unhandled exception be presented to the user in the in-built error dialog box.

    • Analyze your boundary methods so that no exception goes uncaught.

    • On .NET Compact Framework 2.0, handle the AppDomain.UnhandledException event for ...

Get Microsoft® Mobile Development Handbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.