10 ms·
As a company we use C# and Visual Studio as an IDE. Everyone has Resharper, which is undoubtedly an invaluable tool. However, Resharper had a feature that will
by junto 10y ago
As a company we use C# and Visual Studio as an IDE.
Everyone has Resharper, which is undoubtedly an invaluable tool. However, Resharper had a feature that will convert for/for each loops with conditional logic into LINQ lambdas.
For simple cases I find it's conversion useful and readable, but for more complex cases it becomes an unreadable nightmare for anyone bug fixing later on. I find that to be the case even when I personally wrote the original code, so I avoid these conversions whenever they become overly complicated.
- kylemuir 10y agoThankfully, it also has the same "Alt-Enter" to revert said LINQ query :)
- junto 10y agoExactly, but colleagues also have to be encouraged not to always trust what Resharper suggests!
- kylemuir 10y agoDefinitely agree - my pet peeve (although I haven't seen it for a while) is introducting circular references by adding compiled dlls from /bin/debug as references instead of adding a project reference. I use to see it a lot a few years ago, maybe I just got a little better at my job?
- mdpopescu 10y agoWouldn't it be better to simplify the complicated code instead?