analyzer

Harmful collection transformations. Part 2: automatic diagnostics

The previous post contains code examples that can be simplified by removing ToArray() or ToCharArray() calls. And an interesting example with List<char> constructor. But we need to be very attentive to find such places in our code. It would be much safer to do it automatically. This post shows us about automatic compiler diagnostics that can detect issues.

Read more...