VB.NET - How to convert IEnumerable to DataTable in VB.Net without using looping
Asked By Sivanesh Vanmeeganathan on 27-Feb-14 04:09 AM
I used this code
Dim orgCustomers = From rw In ds.Tables(0).AsEnumerable()
Group rw By grpId = rw.Field(Of String)("CustomerID") Into Group
Where (Group.Count() = 1 Or Group.Count > 1)
Select (Function(g) g.Key)
how to convert orgCustomers to DataTable.
I tried this one also, (not working)
Dim ttd As DataTable = chtView.AsEnumerable()
this also, (not working)
Dim tb As DataTable = CType(orgCustomers, DataTable)
but i cannot use looping statements because it makes slow process