35. Find and Replace

Modify the program you wrote for Problem 69. Find files, so that it lets the user find and replace strings in files. When the user enters file-matching patterns and a target string and clicks Find, the program should display the matching files in a CheckedListBox control. If the user checks files and clicks Replace, the program should replace the target text with text entered in another text box in the selected files.

This is a dangerous operation because it modifies the selected files. Making the user select specific files for replacement helps prevent the program from modifying files that the user didn't know would be selected.
Because this is a potentially dangerous program, make sure to test it in a directory containing ...

Get Improving your C# Skills now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.