B
blisspikle
Hello guys, Can not seem to get this straight. I have two comments
where I have questions on the following code.
Public Shared AnalogSensors As New System.Collections.ArrayList()
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim OB_TOP As AnalogSensor
Dim OB_BOT As AnalogSensor
Dim IB_TOP As AnalogSensor
Dim IB_BOT As AnalogSensor
OB_TOP.Name = "howdy"
MsgBox(OB_TOP.Name) 'Question, why can I output name
' here, but I can not do it directly from the Arraylist
AnalogSensors.Add(OB_TOP)
AnalogSensors.Add(OB_BOT)
AnalogSensors.Add(IB_TOP)
AnalogSensors.Add(IB_BOT)
' Msbox(AnalogSensors.Item(0).name) 'This is not correct,
' do I have to use a get, set and a property?
End Sub
Structure AnalogSensor
Public Name As String
Public Slope As Decimal
Public YIntercept As Decimal
End Structure
Thank you,
where I have questions on the following code.
Public Shared AnalogSensors As New System.Collections.ArrayList()
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim OB_TOP As AnalogSensor
Dim OB_BOT As AnalogSensor
Dim IB_TOP As AnalogSensor
Dim IB_BOT As AnalogSensor
OB_TOP.Name = "howdy"
MsgBox(OB_TOP.Name) 'Question, why can I output name
' here, but I can not do it directly from the Arraylist
AnalogSensors.Add(OB_TOP)
AnalogSensors.Add(OB_BOT)
AnalogSensors.Add(IB_TOP)
AnalogSensors.Add(IB_BOT)
' Msbox(AnalogSensors.Item(0).name) 'This is not correct,
' do I have to use a get, set and a property?
End Sub
Structure AnalogSensor
Public Name As String
Public Slope As Decimal
Public YIntercept As Decimal
End Structure
Thank you,