我試圖在函數返回這個集合:轉換EnumerableRowCollection <string>列出<string>
List<string> codes = (from q in Data.AsEnumerable() select q.Field<string>("START"));
return codes;
這將引發錯誤:
Cannot implicitly convert type 'System.Data.EnumerableRowCollection<string>' to 'System.Collections.Generic.List<string>'
什麼是返回這樣一個集合的最好方法?
爲什麼downvote我的問題? – Meidi 2013-04-24 21:20:18