Write a Windows Form application displaying the content of a text file. The top menu should
offer a choice of secondary file names (extensions):
“.txt”
“.xyz”
“.sys”
Selecting one of them should invoke the file selection dialog displaying the file names only
having the selected extension.
When one of those files is selected, the first 40 characters of each of its first four lines should be
displayed (or as many lines as present if less than four lines are recorded in the file). If there are
more lines left in the file, output a string: “xx more lines are not shown.” (substitute xx with the
correct number).
Test the program against several text files with different name extensions.
Comments
Leave a comment