Page 7 : 40
Object-oriented Programming in C#
Input and Output Classes
* Streams
The Stream Concept
The abstract class Stream in C#
The most important members in class Stream
Subclasses of class Stream
Example: Filestreams
The using control structure
More FileStream Examples
Readers and Writers in C#
The class Encoding
Sample use of class Encoding
The class TextWriter
StreamWriter Examples
Members in class StreamWriter
The class TextReader
StreamReader Examples
Members in class StreamReader
The class BinaryWriter
BinaryWriter Members
The class BinaryReader
Members in class BinaryReader
The classes StringReader and StringWriter
The Console class
Members in the Console class
* Directories and Files
The File and FileInfo classes
Members in class FileInfo
The Directory and DirectoryInfo classes
Members in class DirectoryInfo
* Serialization
Serialization
Examples of Serialization in C#
Custom Serialization
Considerations about Serialization
Serialization and Alternatives
Attributes
* Patterns and Techniques
The Decorator Pattern
The Decorator Pattern at Run Time
The Decorator Pattern and Streams
The using control structure
The
using
control structure is helpful when we do IO programming
using
(
type
variable
=
initializer
)
body
The syntax of the using statement C#
Semantics
In the scope of
using
, bind
variable
to the value of
initializer
The
type
must implement the interface
IDisposable
Execute
body
with the established name binding
At the end of
body
do
variable
.Dispose
The
Dispose
methods in the subclasses of
Stream
call
Close
Interfaces in from the C# library
The control structure 'using' defined by 'try-finally'.
The simple write-program programmed with 'using'.
The simple read-program programmed with 'using'.