Results 1 to 5 of 5

Thread: Nested Dyanmic Arrays...I Think

Hybrid View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2007
    Posts
    180

    Re: Nested Dyanmic Arrays...I Think

    Sorry for my ignorance on this one, but I'm not sure how to implement this. Here's my looping "search" routine:

    Code:
        Sub MusicList()
            Dim MusicDirectory As New DirectoryInfo("d:\Music")
            Dim Bands As DirectoryInfo() = MusicDirectory.GetDirectories("*.*")
            Dim Band As DirectoryInfo
            For Each Band In Bands 'loop though folder containing Band Folders
                Dim BandDirectory As New DirectoryInfo(Band.FullName)
                Dim Albums As DirectoryInfo() = BandDirectory.GetDirectories("*.*")
                Dim Album As DirectoryInfo
                For Each Album In Albums 'Loop though Band Folder containing each album
                    Dim AlbumDirectory As New DirectoryInfo(Album.FullName)
                    Dim Songs As FileInfo() = AlbumDirectory.GetFiles("*.mp3")
                    Dim song As FileInfo
                    For Each song In Songs 'Loop through Album Folder containing Songs
    
                    Next
                Next
            Next
        End Sub
    I'm thinking it should create a new collection of "Songs" then add that to the current Album. Then once a collection of "Albums" has been made, add that to the collection for the current Band. Then once the Bands collection is made, add that to the Music Collection. But I just cant figure out how to nest the collection into the parent collection. Then be able to pull it out by "Music.Band(0).Album(0).Song(0).Title"

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Feb 2007
    Posts
    180

    Re: Nested Dyanmic Arrays...I Think

    I think I got it....Thank-you for your help!

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