Which two classes in the .NET Framework allow you to delete a file?

Which two classes in the .NET Framework allow you to delete a file? (Each correct answer presents a
complete solution. Choose two.)

Which two classes in the .NET Framework allow you to delete a file? (Each correct answer presents a
complete solution. Choose two.)

A.
System.IO.FileInfo

B.
System.IO.FileStream

C.
System.IO.Stream

D.
System.IO.Path

E.
System.IO.File

Explanation:
A: System.IO.FileInfo provides properties and instance methods for the creation, copying, deletion,
moving, and opening of files, and aids in the creation of FileStream objects.
E: System.IO.File provides static methods for the creation, copying, deletion, moving, and opening of
files, and aids in the creation of FileStream objects.
Incorrect:
Not B: System.IO.FileStream exposes a Stream around a file, supporting both synchronous and
asynchronous read and write operations.



Leave a Reply 2

Your email address will not be published. Required fields are marked *