Tôi cố gắng để trở về bộ sưu tập này trong một hàm:chuyển đổi EnumerableRowCollection <string> vào danh sách <string>
List<string> codes = (from q in Data.AsEnumerable() select q.Field<string>("START"));
return codes;
này ném lỗi:
Cannot implicitly convert type 'System.Data.EnumerableRowCollection<string>' to 'System.Collections.Generic.List<string>'
cách tốt nhất để trả lại một bộ sưu tập như vậy là gì?
Tại sao lại downvote câu hỏi của tôi? – Meidi