我想做这样的事......
public static List<string> GetAttachmentKeyList()
{
DataClassesDataContext dc = new DataClassesDataContext();
List<string> list = from a in dc.Attachments
select a.Att_Key.ToString().ToList();
return list;
}
Run Code Online (Sandbox Code Playgroud)
Visual Studio说......
无法将类型'System.Linq.IQueryable>'隐式转换为'System.Collections.Generic.List'.存在显式转换(您是否错过了演员?)
什么是正确的语法???