Hello All,
I want to create 10 empty DataTable dynamically.
Is there a way to create multiple empty data tables , without having to create 10 variable / argument of datatype DataTable for it ?
Thanks in advance.
Hello All,
I want to create 10 empty DataTable dynamically.
Is there a way to create multiple empty data tables , without having to create 10 variable / argument of datatype DataTable for it ?
Thanks in advance.
Hi,
How about the following?
listDt = Enumerable.Range(0,10).Select(Function(x) New DataTable()).ToList()
or
listDt = Enumerable.Range(0,10).Select(Function(x) templateDt.Clone).ToList()
Regards,
As an alternate:
Enumerable.Repeat(new DataTable(), 10).toList
Hi @ppr ,
Enumerable.Repeat
method duplicates its reference. So I suppose all items of the list points single datatable instance, don’t they?
Regards,
Thank you very much for this feedback. I did document and update the post
After creating the Data table how can I assign it ? Do I need to create 10 variables with datatype data table ?
If possible can you please send me a screenshot of solution in UiPath.
Thanks in advance.