I am needing to create a subset of a list<> and am doing it with Linq.
I initially made the subset list with one restrictor, and that worked fine.
var ListPatternSubset = from EnumPattern in ListPatterns
where (EnumPattern.Length1 == EnumPiece.Length)
select EnumPattern;//Create a subset for this piece length
but now I realize I need to narrow the subset not only be length but also by waste
var ListPatternSubset = from EnumPattern in ListPatterns
where (EnumPattern.Length1 == EnumPiece.Length AndAlso EnumPattern.WastePer1 > 0)
select EnumPattern;//Create a subset for this piece length
I have tried using "and", "&&", "AndAlso", but nothing seems to work.