Click here to Skip to main content
15,896,063 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to add LIST<class> to A DATATABLE the DATATABLE Already have some values.

DATATABLE

COL1 | COL2 | COL3
____________________



list<class> have two string list

L1 | L2
------------


I want to see the result as DATATABLE

COL1 | COL2| COL3 | L1 | L2
____________________________
Posted

1 solution

C#
dataTable.Columns.Add("L1",typef(string))
dataTable.Columns.Add("L2",typef(string))

foreach(var row in dataTable.Rows){
row[L1]= your value;
row[l2]= your value;
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900