在我的项目中,我的文件名称为:*.generated.cs。我想将它们添加到列表中,但仅限于目录“Sample”或“BestSample”。我有一个代码:
var files = from project in solution.Projects
from document in project.Documents
where document.FilePath == "Sample" || document.FilePath =="BestSample"
select document;
但这不起作用;(我该怎么做?