Object reference not set to an instance of an object

The "Object reference not set to an instance of an object" error means that the application tried to access a reference type that has not yet been initialized.

The following code example will throw this error:

Dim oPersonnel as CIL.Personnel
oPersonnel.FirstName = "Tom"

However, by calling a constructor and creating an instance of the Personnel class, we will be able to assign and then modify a location in memory for the object:

Dim oPersonnel as New CIL.Personnel
oPersonnel.FirstName = "Tom"

Built with HTML5 and CSS3
Copyright © 2014 Sitepearl