Ad
  • Custom User Avatar

    I'll grant that this is a clever use of LINQ to solve the problem. But this is both innefficient - O(n^2) - and hard to read. Using LINQ may make this brief, but it took me over a minute to parse what the code did whereas if it were written more verbosely without LINQ it would likely been quick to understand.

    Like another commenter, when I run across code that looks like this, I have to use resharper to translate it to mortal speak. That is a strong smell that the code is not maintainable.