【发布时间】:2010-07-31 17:26:36
【问题描述】:
我需要从 DataTable 中检索一组“TOP n”行数,其中表行按“Column X”排序,但前提是行的“Column X”值大于提供的比较价值。这是我目前所拥有的:
EnumerableRowCollection query = from history in dt.AsEnumerable()
where history.Field<string>("Column X") > "Value-To-Compare")
orderby history.Field("Column X")
select history;
但我不断收到“运算符'>'不能应用于'string'和'string'类型的操作数”
有什么想法吗?
模糊日志
【问题讨论】:
标签: linq-to-sql