Classes

In this section we carefully examine the VB.NET class, which is fundamental to programming in VB.NET. For illustration we introduce two classes, Customer and Hotel, which will be elaborated in a case study that is used throughout the book. We will introduce the case study itself in Chapter 5.

Classes as Structured Data

VB.NET defines primitive data types that are built into the language. Data types, such as Integer and Decimal, can be used to represent simple data. VB.NET provides the class mechanism to represent more complex forms of data. Through a class, you can build up structured data out of simpler elements, which are called data members, or fields. (See TestCustomer\Step0.)

 ' Customer.vb - Step 0 (same as Step 1) Public Class ...

Get Application Development Using Visual Basic® and .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.