What are the differences between the File and FileInfo classes?
Are you preparing for IT certification? With practice questions, study notes, interactive quizzes, tips and technical articles, uCertify PrepKits ensure that you get a solid grasp of core technical concepts to ace your certification exam in first attempt.
What are the differences between the File and FileInfo classes?
Rating:
The following table describes differences between the File class and the FileInfo class:
| File class is an utility class, which is used to provide static methods to create, copy, delete, move, and open files. | FileInfo class is an informational class, which is used to provide instance methods to create, copy, delete, move, and open files. |
| It is more efficient to use a method of the File class when only one task is to be performed. | It is better to use the instance method of the FileInfo class when an object is to be reused several times. |
| All methods of the File class require a specified path to the file that is to be manipulated. | Methods of the FileInfo class do not require any specified path to the file. |
Rating:
Was this information helpful?
Other articles
- What is Integrated Windows authentication?
- What is XmlDataDocument?
- What is a Pseudocode?
- What is data binding?
- What is a destructor?
