C# - linq查询现有的DataTable
生活随笔
收集整理的這篇文章主要介紹了
C# - linq查询现有的DataTable
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
可以通過linq對現(xiàn)有的DataTable進行查詢,并將結(jié)果拷貝至新的DataTable中例如:
// Query the SalesOrderHeader table for orders placed // after August 8, 2001. IEnumerable<DataRow> query =from order in orders.AsEnumerable()where order.Field<DateTime>("OrderDate") > new DateTime(2001, 8, 1)select order;// Create a table from the query. DataTable boundTable = query.CopyToDataTable<DataRow>();?
轉(zhuǎn)載于:https://www.cnblogs.com/listened/p/4232034.html
總結(jié)
以上是生活随笔為你收集整理的C# - linq查询现有的DataTable的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Java 时间处理
- 下一篇: c# char unsigned_dll