Team LiB
Previous Section Next Section

Summary

In this chapter I covered error handling and the controls and methods that .NET offers to help you. Handling and showing errors in an elegant way is very important to any program you write. I would venture to say that handling errors is even more important in a data entry program. People are, after all, prone to making mistakes. The more information you can give users about their mistakes in the form of an error and a possible correction, the better. You learned how to accomplish this by using message boxes and even by creating your own dialog boxes.

In this chapter you also learned about the ErrorProvider object and its limited usefulness. You explored how to use the EventLog capability of .NET.

Troubleshooting capability in the field is very important to any professional program. I showed you how to use the trace capability of .NET to instrument your code in a helpful manner.

Finally, I demonstrated the Try-Catch-Finally block form of error catching/ handling. You saw some very useful tips for catching specific errors and disposing of objects that you may have forgotten about.

The next chapter covers advanced data validation. This is where you depart from the basic .NET controls and use some specific validation controls similar to what ASP.NET has.


Team LiB
Previous Section Next Section