Does anyone here have experience with LINQ? I was hoping that anyone with some experience with it might be willing to share some opinions or insights about it. Like:
- Do you like LINQ?
- Does LINQ have shortcomings or easy pits to fall into when using it? (especially as a beginner)
- Do you use something besides LINQ? If so, why?

Sorry for bothering anyone on here with this, I'm just curious about the tech as I'm trying to learn C# and I'm not sure S.O. would appreciate opinion based questions.

  • 1
  • 1
    Linq is nice!
    Pitfalls? You can make it slow by accident really easy. Though it hasn't ever really been a problem for me.
    Alternatives? Normal loops...
  • 2
    If you're just learning C# you should be a bit careful with it or maybe even ignore it at first. It's a great tool, but with great power comes great responsibility - i.e. it is easy to chain a hundred Linq commands you may not even really understand and .make things really slow or have unintended outcome. Also (too much) Linq sometimes makes things harder to read/grasp.

    Apart from specific Linq issues in C# you need to be wary about lazy execution and multiple enumeration.
Add Comment