Getting the value of a particular column from datatable without using for each row

Hi

To get data from one specific column and row

Stroutput = dt.Rows(rowindex)(“yourcolumnname”)

To get one entire column as a list of string

Stroutput = ( From row in dt.AsEnumerable() Select Convert.Tostring(row(“ColumnName”)) ) .ToList()

For all functionalities in datatable have a view on this tutorial

Cheers @Kunal_Jain

1 Like