nerdexam
Microsoft

98-372 · Question #135

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

The correct answer is B. System.IO.File D. System.IO.FileInfo. D: 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. B: System.IO.File provides static methods for the creation, copying, deletion, moving, and opening…

Understanding Namespaces and Classes

Question

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

Options

  • ASystem.IO.FileStream
  • BSystem.IO.File
  • CSystem.IO.Stream
  • DSystem.IO.FileInfo
  • ESystem.IO.Path

How the community answered

(55 responses)
  • A
    15% (8)
  • B
    73% (40)
  • C
    4% (2)
  • E
    9% (5)

Explanation

D: 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. B: System.IO.File provides static methods for the creation, copying, deletion, moving, and opening of files, and aids in the creation of FileStream objects. Not A: System.IO.FileStream exposes a Stream around a file, supporting both synchronous and asynchronous read and write operations.

Topics

#System.IO.File#System.IO.FileInfo#file operations#delete

Community Discussion

No community discussion yet for this question.

Full 98-372 Practice