Home > Net >  Use error, consult the LIST of vb.net.
Use error, consult the LIST of vb.net.

Time:05-08

Fellow teachers, I use two methods for programming, can't get the right result,
The first method:
Structure aa
Public la () As Single
End Structure
Dim b (10) As Single
Private Sub ListToolStripMenuItem_Click (sender As Object, As EventArgs e) Handles ListToolStripMenuItem. Click
Dim a1 As aa=New aa
Dim lla As List (Of aa)=New List (Of aa)
A1. La=b
For I=0 To 10
For j=0 To 10
A1. La (j)=I * math.h PI + j
Next
Next
Lla. Add (a1)
MsgBox (lla. Item (0). La (1) & amp; VbLf & amp; Lla. Item (5). La (1))
End Sub
The second method:
Structure aa
Public la () As Single
End Structure
Dim b (10) As Single
Private Sub ListToolStripMenuItem_Click (sender As Object, As EventArgs e) Handles ListToolStripMenuItem. Click
Dim a1 As aa=New aa
Dim lla As List (Of aa)=New List (Of aa)
A1. La=b
For I=0 To 10
Lla. Add (a1)
Next
For I=0 To 10
For j=0 To 10
Lla. Item (I). La (j)=I * math.h PI + j
Next
Next
Lla. Add (a1)
MsgBox (lla. Item (0). La (1) & amp; VbLf & amp; Lla. Item (5). La (1))
End Sub
Code can run normally, but can't get what I want results, where is the mistake

CodePudding user response:

1, generally speaking, can't get the results hope=code doesn't work
2 to ask why can't we get the result of hope, at least want to know what is hope
  • Related