need help with VB.Net

edited January 2009 in Science & Tech
hi all


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

Comments

  • MiracleManSMiracleManS Chambersburg, PA Icrontian
    edited January 2009
    I have no idea exactly what you're trying to do here...Your arraylist is going to be populated with whatever generate_a_game() returns...
  • pragtasticpragtastic Alexandria, VA Icrontian
    edited January 2009
    A quick google search on the api leads me to believe that this might work:

    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.
  • Gate28Gate28 Orlando, Florida Icrontian
    edited January 2009
    Whats in the Generate_A_Game function and what is the overall use of the program?
  • edited January 2009
    Dear all


    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
Sign In or Register to comment.