How Do I Initialize an Empty Array of Datatables?


#1

How do I initialize an empty array of datatables?


#2

dtArray = New DataTable(5) {}

dtArray(0) = dtA

dtArray(5)=dtE

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.


#3

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