I'm working with VB
.NET 2002, 1.0 Framework. Here's my problem: I'm trying to create a STRUCTURE with an array element. The STRUCTURE looks like this:
Private Structure StructOfLabs
Dim LabGroup As String
Dim Hours() As Integer
My big problem comes when I try to put stuff into the array. I can get to the LabGroup ok, but the compiler doesn't like me trying to access Hours() until I instantiate it. It tells me:
"An unhandeled exception of type 'System.NullReferenceException' occured in UpdateCalendar.exe
Additional information: Object reference not set to an instance of an object."
myLabs(0).LabGroup = ""
myLabs(0).Hours(0) = 0
I've searched & searched and I get tantalizing hints of how to go about it, but nothing materalizes. I would sure appreciate a bit of help. Thanks, all. -RK