Designing Classes

Classes are the primary building blocks with which you write and reuse code that targets the .NET Framework. Classes can model abstractions for real-world entities such as customers, invoices, and expense reports. They can also model more task-oriented abstractions such as a processor for handling client requests or a dispatcher for running a series of jobs in sequence or in parallel.

In short, classes make it possible to design in terms of abstractions and then to write implementations for these abstractions that can be compiled into production code and distributed via assemblies. A typical class contains members such as fields and methods. Listing 4.1 presents a simple example of a definition of a class named Human that is ...

Get Building Applications and Components with 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.