CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2004
    Posts
    67

    VB.NET: Question on presenting array

    If i have a list of arrays, how to go about viewing every individual of it...

    Say inside each of the array has this content:

    Name: OO
    Age: XX

    how to you guys present the dynamic arrays or arrays on one form in your Window application......

    Thanks

  2. #2
    Join Date
    Sep 2001
    Location
    Montreal Canada
    Posts
    1,080

    Re: VB.NET: Question on presenting array

    You will have to loop

    There's 2 way of doing it

    1 -
    Public Class YourType
    Public Name as string
    Public Age as integer
    End Class

    Dim YourArray() as YourType
    'Fill In YourArray somewhere Here
    For i as integer = 0 to YourArray.Gelenght(0) - 1
    'Do your stuff here
    next

    OR

    2 -

    Public Class YourType
    Public Name as string
    Public Age as integer
    End Class

    Dim YourArray() as YourType
    'Fill In YourArray somewhere Here
    For Each I as YourType in YourArray
    'Do your stuff here
    Next
    Nicolas Bohemier

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured