Convert Icollection to datatable


#1

Hi all,

I am trying to convert my icollection of string to a datable, but I have this issue, how do i resolve it?

Thanks!

image


#2

Hi @saraawq,

you cant convert it Directly list to datatable.
use build data table to build the table first.
then using add data row push the data into datatable.

Refer this site for basics
https://www.tutorialspoint.com/csharp/csharp_basic_syntax.htm
https://www.tutorialspoint.com/vb.net/index.htm

Regards,
Arivu