Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 System.Data.DataView 对象,但只想要前十条记录,按名为“responseTime”的列排序。
DataView dv = Factory.GetDataView("something"); dv.Sort = "responseTime desc"; // now what?
如果您使用的是 .NET 3.5,则可以使用 LINQ 查询。就像是:
var query = (from row in dv select row).Take(10)