I have been reading Programming Microsoft LINQ in Microsoft .NET Framework 4, and now I am understanding the join
clause in LINQ, but I have a doubt or question respect about its definition; in the book it is defines as:
You can define equality comparisons only by using a special
equals
keyword that behaves differently from the==
operator, because the position of the operands is significant. Withequals
, the left key consumes the outer source sequence, and the right key consumes the inner source sequence. The outer source sequence is in scope only on the left side ofequals
, and the inner source sequence is in scope only on the right side.
And there is also a formal definition about this operator:
join-clause ::= join innerItem in innerSequence on outerKey equals innerKey
Please, can someone explain me the above concept in other words or by paraphrasing it?
outersource join innersource on outerkey equals innerkey
. Essentially, what they're saying is you cannot write the following:outersource join innersource on innerkey equals outerkey
IEnumerable
context. I am sure this could help withIQueryable
.