Linq to object Right outer join

I have written following linq query yet I am not getting expected result.My Expected result is all the matching record bettween lst & list & all the non matching record from list
for example.

I want following result


Try it like this:

result is (a,b,c,d,e,f)

Working sample:


To make a left/right join in linq you have to use DefaultIfEmpty method, that will yield (default) result when there is no match (the joined result is empty). However, default value for string is null so you have to provide default value from the “left side” collection to see it in the result set.

Alternative approach

This is probably more convenient approach. Instead of selecting from z & providing the default value, you will select from x.address – the left side of the join.