How to convert the column in order by linq
'String欄位 轉 Int32 遞增排序
evensQuery = (From task In tblTaskShow.AsEnumerable _
Select task).OrderBy(Function(task) Convert.ToInt32(task.Item("index")))
If evensQuery.Any Then
'最後一筆,即最大index
_maxMainIndex = evensQuery.CopyToDataTable.Rows(evensQuery.CopyToDataTable.Rows.Count - 1).Item("index").ToString
End If
沒有留言:
張貼留言