I want to create a strongly typed multidimensional array or collection containing the following values from a database:
- FileName (As String)
- FileSize (As Integer)
Requirements:
- Accessible via index (e.g. Arr(i)(j), Arr.Row(i), etc)
- Efficient (i.e. fast & not resource intensive)
- Easily manipulated, added to, appended, etc.
- .NET 3.5 compatible
Thanks for the great answers everyone. Here's what I went with... :)
Structure FileRecord
Dim Name As String
Dim Size As Integer
Sub New(ByVal FileName As String, ByVal FileSize As Integer)
Me.Name = FileName
Me.Size = FileSize
End Sub
Sub New(ByVal Files() As FileRecord)
For Each f As FileRecord In Files
Dim fr As New FileRecord(f.Name, f.Size)
Next
End Sub
End Structure