Encapsulation

Encapsulation means that all of the members of a class and the processes to be performed on those members must be contained within the class they reside in. Another way of saying this is that the class must contain everything it needs to store and operate in the data it defines. That means, for example, if a class contains date data, it must also contain the information and procedures required to format and print the data, if that is a required function of the class. In pure form, it also means that the class should not have to rely on any external data or procedures, but be entirely self-contained. In this sense, the class can be seen as a complete program unto itself.

Besides containing data and the procedures to be performed ...

Get ADO.NET Programming in Visual Basic™ .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.