Home » C# TextReader

C# TextReader

C# TextReader class is found in System.IO namespace. It represents a reader that can be used to read text or sequential series of characters.

C# TextReader Example: Read All Data

Let’s see the simple example of TextReader class that reads data till the end of file.

Output:

Hello C# C# File Handling by tutoraspire 

C# TextReader Example: Read One Line

Let’s see the simple example of TextReader class that reads single line from the file.

Output:

Hello C# 
Next TopicC# BinaryWriter

You may also like