`private` or `internal` types or `private` members that are never executed or referenced are unused code: unnecessary, inoperative code that should be removed.
Redundant code is included in the compilation so it needs to be compiled as well. Due to this, removing it will reduce the compilation time and the project maintanace. It will also simplify the onboarding time for new joiners since they will not need to understand what it does and why it's there.
=== Exceptions
This rule doesn't raise issues on:
* empty constructors
* members with attributes
* `Main` method
* methods with event handler signature `void Foo(object, EventArgs)` that are declared in partial class
* empty serialization constructor on type with https://learn.microsoft.com/en-us/dotnet/api/system.serializableattribute[System.SerializableAttribute] attribute.
* internal members in assemblies that have a https://learn.microsoft.com/en-us/dotnet/api/system.runtime.compilerservices.internalsvisibletoattribute[System.Runtime.CompilerServices.InternalsVisibleToAttribute] attribute.