更新时间:2023-12-01 14:56:10
您可以
使用指定条件从DataTable创建DataView ,然后
调用.ToTable()将过滤后的数据转换为DataTable 。
Btw,取决于你想要做什么,因为DataView是数据绑定控件的有效数据源类型,您可以跳过将过滤后的表复制到分开DataTable以节省时间和内存。
Btw, depending on what you want to do, since DataView is valid type of DataSource for data binding controls, you may skip copying filtered table to separate DataTable to save time and memory.