You would still have to declare your array, then in a loop when you are iterating your files, you would dynamically reinstantiate an array and add it to the original array (using redim preserve or using an arraylist).
You could do something like:
VB Code:
Dim arrAllFilesData As New ArrayList Dim arrTempSingleFileData As ArrayList For intFileCount As Integer = 0 To 100 'Set your file stuff here 'Reinstantiate the array arrTempSingleFileData = New ArrayList For intFileLineCount As Integer = 0 To 100 'iterating your file line by line arrTempSingleFileData.Add("Some File Text Here") Next 'Add the single file array to the main array arrAllFilesData.Add(arrTempSingleFileData) Next
so for each file you would be reusing the arrTempSingleFileData arraylist as many times as you need to.




Reply With Quote