Yes, it is guaranteed to work as long as everything is within the same assembly. If you cross the assembly boundary, it will not work, although the anonymous types are internal and the โidentificationโ is based on:
- Assembly used in
- Properties:
Everything must be correct so that the types are considered the same.
It is unpleasant. On the one hand, your GetJoin method can be simplified to:
return (from a in objA
join b in objB
on a.ID equals b.AID
select (object) new { a.ID, a.Name, b.Address })
.ToList();
... , , .
, . , , , , ... : (