April 2013
Intermediate to advanced
1700 pages
92h 51m
English
Because the CLI is inspired by the principles of OO programming, it shouldn’t surprise you that classes are one kind of type the CLI supports. In essence, a class is a container for data and operations that can be performed on that data. By keeping the data representation of a class private, one reaches the virtue of encapsulation, where implementation details can change as long as the public contract stays the same.
Also in true OO style, the CLI supports the creation of class hierarchies, where one type derives from another. For example, an Apple type could derive from a Fruit base class. The details of this are explained extensively when we cover OO programming with C#.
Classes are formally known as
Read now
Unlock full access