K
krollenhagen
Hello-
Let me start out by saying that I am new to .net and was only a hobby
vb6 programmer.
I am getting the warning:
"Variable 'arrOutputData' is used before it has been assigned a value.
A null reference exception could result at runtime."
I get this warning in the line:
"arrOutputData(i).Days = sinDays"
I also have the following in my code:
Structure Data
Dim Days As Single
Dim Events As Integer
Dim EventsPerWeek As Single
Dim TotalTime As TimeSpan
Dim TimePerWeek As TimeSpan
Dim TimePerEvent As TimeSpan
Dim TimeMin As TimeSpan
Dim TimeMax As TimeSpan
End Structure
Dim arrOutputData() As Data
Dim sinDays As Single
I don't understand why I get a warning saying that the variable is used
before it has been assigned a value when I am trying to assign it a
value at that point in the code.
Any help is appreciated. Thank you.
Let me start out by saying that I am new to .net and was only a hobby
vb6 programmer.
I am getting the warning:
"Variable 'arrOutputData' is used before it has been assigned a value.
A null reference exception could result at runtime."
I get this warning in the line:
"arrOutputData(i).Days = sinDays"
I also have the following in my code:
Structure Data
Dim Days As Single
Dim Events As Integer
Dim EventsPerWeek As Single
Dim TotalTime As TimeSpan
Dim TimePerWeek As TimeSpan
Dim TimePerEvent As TimeSpan
Dim TimeMin As TimeSpan
Dim TimeMax As TimeSpan
End Structure
Dim arrOutputData() As Data
Dim sinDays As Single
I don't understand why I get a warning saying that the variable is used
before it has been assigned a value when I am trying to assign it a
value at that point in the code.
Any help is appreciated. Thank you.