Bird
0
0

Which C# class is commonly used to read text files line by line?

easy🧠 Conceptual Q1 of 15
C Sharp (C#) - File IO
Which C# class is commonly used to read text files line by line?
AStreamReader
BFileWriter
CTextWriter
DFileStreamWriter
Step-by-Step Solution
Solution:
  1. Step 1: Identify classes for reading files

    StreamReader is designed to read text files line by line efficiently.
  2. Step 2: Compare other options

    FileWriter and TextWriter are for writing, not reading. FileStreamWriter does not exist.
  3. Final Answer:

    StreamReader -> Option A
  4. Quick Check:

    Reading text files line by line = StreamReader [OK]
Quick Trick: Use StreamReader to read files line by line easily [OK]
Common Mistakes:
MISTAKES
  • Confusing StreamReader with writing classes
  • Using non-existent classes
  • Trying to read with FileWriter

Want More Practice?

15+ quiz questions · All difficulty levels · Free

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