ReSharper can detect and highlight dead code when solution analysis is enabled.
It will report some false positives, so manual verification is still necessary. For example, R # will not determine when a function is used only through reflection, and will consider that it is not used. The same goes for things like agreement-based IoC containers, etc.
JetBrains provides some custom attributes to decorate your code (for example, [UsedImplicitly] ). They guide the R # parsing engine and document your code.
source share