Chapter Summary

  • Your exception-handling strategy should catch the most specific error possible, but only when your application can resolve the problem or add useful troubleshooting information to the exception. If you catch an exception and cannot resolve it, rethrow the exception. If you must create a custom exception class, mark it as serializable, make the class accessible to other developers, and provide overloaded constructors. If you need to log more information than is captured in the event log for unhandled exceptions, or if you want to display a friendly error message to users, you can catch DispatcherUnhandledException and set e.Handled to False.

  • Black box testing functions without having any information about an application’s inner workings. ...

Get MCPD 70-518 Exam Ref: Designing and Developing Windows® Applications Using Microsoft® .NET Framework 4 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.