Page 35 : 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
Serialization and Alternatives
When is it appropriate to use serialization?
What are the alternatives to serialization?
Serialization
An easy way to save and restore objects in between program sessions
Useful in many projects where persistency is necessary, but not a key topic
Requires only little programming
Custom programmed file IO
Full control of object IO
May require a lot of programming
Objects in Relational Databases
Impedance mismatch
: "Circular objects in retangular boxes"
Useful when the program handles large amounts of data
Useful if the data is accessed simultaneous from several programs
Not a topic in this course