Encapsulation and Information Hiding

Encapsulation and information hiding are object-oriented terms you might have encountered before. They are terms that have to do with strategy. Encapsulation literally means adding members—fields, properties, methods, and events—to classes or structures. As a general rule, members are added where they are most advantageous; that is, where they will promote the greatest reuse or an optimal refinement of your implementation.

A class consumer is a programmer that will create instances of the class. The producer (the person who creates the class) might be the ultimate consumer too.

A generalizer is a consumer that will inherit from your class.

Information hiding has to do with the partitioning of members between ...

Get Visual Basic® .NET Unleashed 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.