Exercises

  1. Expanding on the code you wrote in Listing 7.5, look up the EventLogTraceListener class in the .NET Framework SDK and add a custom listener to the application that writes the debug information to the event log as well as the text file.

  2. Create a new ASP.NET application with a CommandButton and a TextBox. In the code-behind for the Button1_Click event, add a string variable named strTest and an integer variable named intTest. Set a breakpoint on the Page_Load event for WebForm1 and use the Me debugging window and the Immediate debugging window to evaluate the variable values on the form. Change the breakpoint properties to enter break mode when the value of strTest is equal to "Test Break Mode". While in break mode, change the value of strTest and see what the results are by doing a Response.Write back to the Web form.

  3. In each code listing you write for the remainder of the lessons, look up the Exception classes that are related to the methods that you're using, and try to incorporate SEH in all the methods that you write.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.23.130.191