Home‎ > ‎

LINQ Tips

  • Always return IEnumerable<>
    Don't call .ToList() or .ToArray() when returning results from a function, just have the function return IEnumerable. The expression tree will remain unevaluated for one more step, potentially improving performance
Comments