Search code examples
c#linqmethodsreturn-valueout-parameters

.NET LINQ Call Method with Out Parameters Within Query and use Out Values


I have a list of objects, which has a method that has a couple of out parameters. How do i call this method on each object, get the out parameter values and use them later on in the query, perhaps for checking in a where clause?

Is this possible and if so can someone please demonostrate through sample code.

Thanks!


Solution

  • Maybe you should use a for each loop and then use your query?

    (Actually, it's hard to say what to do best in this situation without knowing your code)