If I use the Resharper code cleanup function, I'm finding my code ...
var personInfos = persons.Select(Mapper.Map<PersonInfo>).ToList();
is changed to ...
var personInfos = Enumerable.ToList(persons.Select(Mapper.Map<PersonInfo>));
But then Resharper makes a suggestion "To extension method invocation" for the Enumerable.ToList
so the code goes back to ...
var personInfos = persons.Select(Mapper.Map<PersonInfo>).ToList();
I've checked in the Resharper code editing options, but I can't see where/how I can stop this toggling behaviour
I think @Matthias may be correct
I've updated to current Resharper, i.e. 2016.1.2 and tried the code ...
var personInfos = persons.Select(Mapper.Map<PersonInfo>).ToList();
Resharper no longer offers a suggestion
And @Vlad274 this is with my code cleanup Optimise 'using' directives
and Shorten qualified references
both still checked
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With