I have 2 lists of different objects, that I need to join on 2 paramaters. Using Linq, I can join the lists with anonymous types.
from L1 in List1
join L2 in List2 on new { L1.Field1, L1.Field2 } equals new { L2.Field1, L2.Field2 }
select...
This works perfectly, except I want to include empty string matches on Field2. I’ve trimmed any whitespace from both lists also, so they are both empty strings.
Is this possible?
Ahh solved it, Field1 in List1 was null, not empty. setting it to an emptry string when null fixed the problem.