O'Reilly logo

C# Primer: A Practical Approach by Stanley B. Lippman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

2.1. Our First Independent Class

A class may represent an independent abstraction, or it may represent a specialization of a more general abstraction. For example, FileStream and MemoryStream are both specialized class definitions of the System.IO namespace Stream class. A stream represents a general flow of data either into or out of our program. It is an abstract class because although it defines the behavior of a stream (the public interface); it does not provide a complete implementation. The completion of the stream implementation is left to the more specialized file and memory stream classes, which define the input/output medium. Both the file and the memory stream classes are called subtypes of the stream class type. This type/subtype ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required