The easiest way to learn is by doing, so let’s create a sample class. This sample class module will define a new type whose purpose is to contain employee information. After setting up the class itself, you will learn how to expose properties, methods, and events to its user.
Begin by creating a new project in Visual Basic .NET. Select Class Library from the list of templates available, and name the project MyClasses. Click OK to create a class library project named MyClasses. Notice that the Solution Explorer window contains a file named Class1.vb; this file will contain the code that defines your new class.
You can include multiple classes in a Class Library project by choosing Project, ...