c# - Adding Datatable to List<Datatable>, data being persisted through add(). Why? -


i have need add 1-* datatables list<datatable>. on first iteration through, confirm appropriate data has been loaded datatable gets added list.

however upon second iteration, i"m noticing first item added has been overwritten data of second item , , on.

i tried here, in hopes creating new datatable , adding list help, i'm still running same issue.

datatable dt = new datatable(); dt = _dtdetails;                 // _dtdetails datatable _dtdetailslist.add(dt);          // _dtdetailslist list<datatable> 

this should straight forward add. i'm doing similar things elsewhere in code , it's not having same end result this. there nothing special list or datatable. normal stuff. thoughts?


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 -