TextReader and TextWriter Classes in C#

This article has been excerpted from book "The Complete Visual C# Programmer's Guide" from the Authors of C# Corner.

Like the abstract Stream class, which provides the base of all byte streams, the abstract TextReader and TextWriter classes provide the base for all character streams. These classes are used to read and write a sequential stream of Unicode characters. Since these classes read and write characters, streams extending these classes can do specific encoding for localization purposes. TextReader and TextWriter do not provide random access. Table 6.11 lists some of the methods used with the TextReader class, and Table 6.12 lists methods to be used with TextWriter.

table-6.11.gif

Table 6.11: Some Methods of the TextReader Class

table-6.12.gif

Table 6.12: Some Methods of the TextWriter Class

Conclusion


Hope this article would have helped you in understanding TextReader and TextWriter Classes in C#. See other articles on the website on .NET and C#.

visual C-sharp.jpg The Complete Visual C# Programmer's Guide covers most of the major components that make up C# and the .net environment. The book is geared toward the intermediate programmer, but contains enough material to satisfy the advanced developer.

Recommended Free Ebook
Similar Articles