need help with VB.Net
hi all
I have writen a small programs, I stack, I want to know if anyone can help me
thank you
I have writen a small programs, I stack, I want to know if anyone can help me
thank you
Structure my_chosen
Dim first_number As Integer
Dim second As Integer
Dim third As Integer
Dim fourth As Integer
Dim fifth As Integer
Dim sixth As Integer
Dim seventh As Integer
End Structure
Sub Main()
Dim chosen_number As my_chosen
Dim i As Integer = 0
Dim game_list As New ArrayList
For i = 0 To 49
'in order to help you understand my question better
' I implement a code here
chosen_number =generate_a_game()
game_list.Add(chosen_number)
Next
'how do I display 49 records in arraylist game_list thank you
'that means I wish to display 50 games and each entry go 7 number
'however it has been fixed, thank you for your times in reading this message
End Sub
0
Comments
For i = 0 To game_list.Count - 1
Console.WriteLine(CStr(game_list.Item(i)))
Next
Since ArrayLists are zero indexed, we start at zero and iterate up to count - 1 (since count would reference a memory location outside the list). For printing, we use the iterator (i) to reference each item we want in your ArrayList : game_list , and print it out to the console.
I have no actual experience with VB, so let us know if this works for you or not.
Thank you for your response, I fix the problems, thank to <cite class="ic-username"></cite>pragtastic suggested me good opinion
my program supposed to have a list of 50 games lotto, each games has 7 numbers,
Now I got it fixed, everything being works out so well
I am not very sure if anyone of you are interested to see my code. if you are, I am willing to PM you my code,
....... lol