![]() In this chapter I discuss thevarious techniques you can use to validate data and maintain the integrity of anapplication. In every program data must be validated before the program can proceed withfurther processing and storage of the input data. ![]() If you feel the need to create custom exception classes to meet thespecific requirements of an application, you can do so by deriving from the ApplicationException class. The Framework Class Library (FCL) provides a huge set of exceptionclasses for dealing with various unforeseen conditions in the normal executionenvironment. NET helps you fire and handle these exceptions with thehelp of try, catch, finally, and throwstatements. NET Framework that allows theCommon Language Runtime (CLR) and your code to throw exceptions across languagesand machines. NET Framework uses the Windows structured exception handling model.Exception handling is an integral part of the. Use these tools invarious combinations to validate data that is entered in controls. Know how to create custom exception classes and custom error messages learn to implement them in a program.Įxperiment with the ErrorProvider component, the Validating event, and other validation techniques. Use these blocks with various combinations and inspectthe differences in your code's output. NET installation.Įxperiment with code that uses the try, catch, and finally blocks. NET Combined Help Collection isinstalled as part of the Visual Studio. Review the "Exception Handling Statements" and the "BestPractices for Exception Handling" sections of the Visual Studio. This exam objective covers the ErrorProvider component andvarious other input-validation techniques. The WindowsForms library provides an ErrorProvider component that can be used todisplay helpful error messages and error icons if data that is entered isincorrect. The best place to avoid incorrect data inan application is at the sourceright where the data enters. It allows you to create your own exception handling classes anderror messages that are specific to your application. ![]() NET Framework provides somepredefined exception classes to help you catch these exceptional situations inyour programs. This examobjective covers the use of exception handling to create robust andfault-tolerant applications. A good Windows application mustrecover gracefully from this problem rather than abruptly shut down. For example, the database server is down, a file ismissing, or a user has entered improper values. When you run a Windows application, it may encounter problems that youthought would not occur. NET":Ĭreate and implement custom error messagesĬreate and implement custom error handlers. This chapter covers the following Microsoft-specified objectives for the"Creating User Services" section of Exam 70-316, "Developing andImplementing Windows-Based Applications with Microsoft Visual C#. MCAD/MCSD Training Guide (70-316): Developing and Implementing Windows-Based Applications with Visual C# and Visual Studio.NET
0 Comments
Leave a Reply. |