Bird
Raised Fist0

Which C# class provides methods to manipulate file and directory paths?

easy🧠 Conceptual Q1 of Q15
C Sharp (C#) - File IO
Which C# class provides methods to manipulate file and directory paths?
ADirectoryInfo
BPath
CFileStream
DFileReader
Step-by-Step Solution
Solution:
  1. Step 1: Identify classes related to file system paths

    The Path class contains static methods for working with file and directory path strings.
  2. Step 2: Compare with other classes

    FileStream is for file reading/writing, DirectoryInfo for directory info, FileReader is not a standard class.
  3. Final Answer:

    Path -> Option B
  4. Quick Check:

    Path class = Path [OK]
Quick Trick: Use Path class for path string operations [OK]
Common Mistakes:
MISTAKES
  • Confusing Path with DirectoryInfo
  • Using FileStream for path manipulation
  • Assuming FileReader exists

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More C Sharp (C#) Quizzes