Linq alias in for each loop

  • Thread starter Thread starter chris.kennedy
  • Start date Start date
C

chris.kennedy

I have some linqtosql

Dim col = (From cd In ctx.TBLContactData _
Join cc In ctx.TBLCompanyContacts On cc.CompanyContactID
Equals
cd.CompanyContactID _
Select test = cc.CompanyContactID).Skip(0).Take(10)


When I loop through the collection


For Each colobj In col
'I want be able to write col.test but this does work


It's important that I can reference cc.CompanyContactID as an alias.
 
Sorry about that. Could you post the answer here as well as it isn't showing
up in the other group. Cheers.
 
Back
Top