How to return datatable using Take() using C# -
i have function returns datatable, added code sort datatable using dataview , should return top 10 rows sorted dataview.
dataview dvdt = dtdata.defaultview; dvdt.sort = "value desc" var vlist = dvdt.totable().asenumerable().take(10);
i want know how can make sure datatable return item. how convert "vlist" datatable?
i use: c# , .net 3.5 framework.
you can use datatableextensions.copytodatatable
:
var table = vlist.copytodatatable();
Comments
Post a Comment