Explore BrainMass
Share

C# Programming File Info Class

This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

Create a file that contains your favorite movie quote. Use a text editor such as Notepad and save the file as Quote.txt. Copy the file contents and paste them into a word-processing program such as Word. Save the file as Quote.doc. Write console application that displays the sizes of the two files as well as the ratio of their sizes to each other. To discover a file's size, you can create a System.IO.FileInfo object using a statement such as the following, where FILE_NAME is a string that contains the name of the file:

FileInfo wordInfo = new FileInfo(FILE_NAME);

© BrainMass Inc. brainmass.com March 22, 2019, 2:41 am ad1c9bdddf
https://brainmass.com/computer-science/c-sharp/c-programming-file-info-class-585047

Solution Preview

Dear Student,
Please find the solution attached. Text file used is "quote.txt" and Word file used is "Quote.doc".
You can ...

Solution Summary

This solution introduces FileInfo Class. It uses two different file types text and word and uses them to show the use of the class. The application displays the sizes of the two files as well as the ratio of their sizes to each other. To discover the file's size, System.IO.FileInfo object is used.

$2.19