Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 7

STREAMWRITER CLASS

Class is more popular in File Handling, and it is very helpful writing text data in the file
• @ symbol before a var is used if you want to call a variable class (var @class = 1; , var @virtual = 2;,
var @return = 3;)
FOR STRING IT USES THE LITERAL, FOR EXAMPLE
“c:\\test\\example\\”
is equivalent to
@”C:\test\example\”

1
HOW TO WRITE TEXT INTO A FILE USING
STREAMWRITER CLASS? WHAT IS
STREAMWRITER
CLASS?
DOCUMENTS
ATTACH

EXERCISES 1 AND 2 StreamWriter Class is more popular in


File Handling, and it is very helpful in
writing text data in the file is easy to
use and provides a complete set of
constructors and methods to work

2
STREAMREADER CLASS

Allows you to read text files easily


• Implements a TextReader that read characters from a byte stream in a particular encoding
• StreamReader class uses UTF-8 Encoding by defaults
• StreamReader class is designed for character input in a particular encoding
• Use this class for reading standard text file

• UTF-8 is a Unicode encoding that represents each code point as a sequence of one to four
bytes. Unlike the UTF-16 and UTF-32 encodings,

3
HOW TO READ
FILE USING
STREAMREADER
CLASS?

DOCUMENTS
ATTACH

EXERCISES 3
WHAT IS TEXTWRITER CLASS?

The TextWriter class represents a writer


that can write sequential series of
characters. You can use this class to write Documents attach
text in a file. It is an abstract base class Exercise 4
of StreamWriter and StringWriter, which
write characters to streams and string
respectively.

5
WHAT IS TEXTREADER CLASS?

DOCUMENTS ATTACH EXERCISES 5


6
THANK YOU

Alejandro B. Sotelo​
09666470918
soteloalejandro@gmail.com
asotelo@psu.edu.ph

You might also like