CA1811: Avoid uncalled private code
This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, use the version selector at the top left. We recommend upgrading to Visual Studio 2019. Download it here
A private or internal (assembly-level) member does not have callers in the assembly, is not invoked by the common language runtime, and is not invoked by a delegate. The following members are not checked by this rule:
Explicit interface members.
Members that are overrides.
This rule can report false positives if entry points occur that are not currently identified by the rule logic. Also, a compiler may emit noncallable code into an assembly.
How to Fix Violations
To fix a violation of this rule, remove the noncallable code or add code that calls it.
When to Suppress Warnings
It is safe to suppress a warning from this rule.