How Do I Initialize an Empty Array of Datatables?


How do I initialize an empty array of datatables?


dtArray = New DataTable(5) {}

dtArray(0) = dtA


if you change your mind to use list which has dynamic memory allocation, below is the syntac where you need not have to specify the size.

listDT = New List(Of DataTable)

You need to use invoke method activity to Add datatables to list.


Or install Microsoft.Activities.extensions package and use Add To Collection activity.