O'Reilly logo

MCAD/MCSD.NET Training Guide (Exam 70-316): Developing and Implementing Windows®-Based Applications with Microsoft® Visual C#™ .NET and Microsoft® Visual Studio® .NET by MCSD Amit Kalani - MCAD

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Apply Your Knowledge

Exercises

3.1. Handling Exceptions

Recall that Step by Step 2.5 in Chapter 2 demonstrates the use of common dialog boxes through the creation of a simple rich text editor. This editor allows you to open and save a rich text file. You can also edit the text and change its fonts and colors. The program works fine in all cases except when you try to open or save a file that is already open; in that case, the program throws a System.IO.IOException exception.

The objective of this exercise is to make a robust version of this program that generates a warning about the open file rather than abruptly terminating the program.

Estimated time: 15 minutes

1.
Open a new Windows application in Visual C# .NET. Name it 316C03Exercises

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required