From column to array

Hello friends,
@rkelchuri, @Ninett_Panfir, @Rammohan91, @balupad14, @Florent_Salendres, @vvaidya, @Palaniyappan, @ClaytonM, @vvaidya

How to extract a column of a datatable and trasform it in an array?
thank you,
Cami

1 Like

I normally would use this method:

dtvariable.AsEnumerable.Select(Function(r) r("columnname").ToString.Trim ).ToArray

if you don’t want a string array, then just convert the value inside the parentheses to the desired type.

Regards.

3 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.