我有这样的结构。
public class ExportStructure
{
public string issueid { get; set; }
public string filename {get;set;}
public bool export { get; set; }
}
public class ExportStructureManager
{
public List<ExportStructure> ExportIntoStructure { get; set; }
public ExportStructureManager()
{
this.ExportIntoStructure = new List<ExportStructure>();
}
public ExportStructure AddToStructure(string issueid,string filename,bool exportornot)
{
ExportStructure expstr = new ExportStructure();
expstr.issueid = issueid;
expstr.filename = filename;
expstr.export = exportornot;
this.ExportIntoStructure.Add(expstr);
return (expstr);
}
public bool GetStatusFromStructure(string issuekey)
{
return (from p in ExportIntoStructure
where p.issueid == issuekey
select p.export));
}
}
从上面的一个,我想执行GetStatusFromStructure
它应该返回我的export
财产状态。对于那个我是这样写的。但它给出了错误
无法将类型“System.Collections.Generic.IEnumerable”隐式转换为“bool”
在select p.export
如何解决这个问题?