dpflagg
Newcomer
I have a data structure that is known at compile time, so I thought I would put it in a structure. However, it seems like I am late binding, but I have no intention to (I didn't even know what it was before I got an error, because the Compact Framework doesn't support it).
Here is a snippet:
Now, when I try to access the data, like txtBox.Text = resetCommand.text, it says I'm late binding.
How should I be doing this differently?
Thanks!
Here is a snippet:
Visual Basic:
Enum commandEnum
ReadCommand
WriteCommand
OtherCommand
End Enum
Public Structure commandStruct
Dim commandType As commandEnum
Dim commandCode As String
Dim numBytes As Integer
Dim text As String
Public Sub New(ByVal commandType As commandEnum, _
ByVal commandCode As String, _
ByVal numBytes As Integer, _
ByVal text As String)
Me.commandType = commandType
Me.commandCode = commandCode
Me.numBytes = numBytes
Me.text = text
End Sub
End Structure
Public resetCommand = New commandStruct(commandEnum.OtherCommand, "0x01", 0, "Reset MPU")
Now, when I try to access the data, like txtBox.Text = resetCommand.text, it says I'm late binding.
How should I be doing this differently?
Thanks!