I can solve this problem by messing around with the external parts of my code base, but I thought I'd ask to see if there was an easier way to do this.
I have the following linq request.
(select a in objectA
where a.type = 1
select new
{
Id = a.Id,
Field2 = <needThisValue>
Field3 = <needThisValue>
}).ToList();
Now two "needThisValues" should be provided through the external variables of a method that takes a, for example
TestMethod(object a, out string stringA, out string StringB)
So, anyway, can I artfully call this method from a linq statement to populate two fields?
Thanks in advance.
source
share