c# - How to populate specific DataTable column with values -


hello have datatable updatedvalues, , wondering if there way set value of column value.

int rowindex = 0; foreach(string val in something)     {     try         {         updatedvalues.columns["books"][rowindex] = val;          console.writeline("went here");         }     catch        {        }      rowindex++;     } 

the try won't compile because has incorrect syntax, wondering if there similar in try.

your question confusing take stab @ response.

datatables matrices, similar excel, reference specific value access code:

var myval = datatable.rows[row][column];  //to value 

or

var x = 1; var y = 3;   datatable.rows[x][y] = myval;  //to set value 

and umphishrey's mcgee posted before me can iterate on values.


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -