How to replace column value when looping rows?
My DataTable has two columns, I want to replace the value of the first column on every row. I'm unable to get or set column value. So far I only manege to access DefaultValue and ColumnName etc.
Even if creating new DataColumn(), I'm not able to set its value.
Feels like I'm missing some fundamental stuff here...
foreach (var row in dataTable.Rows)
{
foreach (DataColumn column in dataTable.Columns)
{
// column Unable to get or set value
}
}
Running .NET Framework 3.5, should I use linq?