We will be interacting with our classes the entire time we are programming, so spending a little extra time up front is an investment that will pay dividends almost immediately. As long as we remember a few simple concepts, we will be able to make very quick work of creating these classes. (For an even quicker way to create them, sneak a peek at Chapter 11, It's a Generation Thing, about Code Generation!)
One of the first things we will need for our new classes is a constructor. Constructors are used to "new up" an object. You have probably seen or written syntax similar to the following example:
OrderHeader header = new OrderHeader();
Or in VB.NET:
Dim header As OrderHeader = New OrderHeader()
In this example, we are creating a new OrderHeader object. This object represents the OrderHeader table we created in our database. To create this new object, we need a constructor (in this case the "default" constructor). Our default constructor is simply a method with no return object...