This method is not reachable from any method outside the class.
This method is never called or is only called from other dead code. Dead code is defined as code that is never directly or indirectly executed by a public method.
Example 1: In the following class, the method DoWork()
can never be called.
public class Dead {
private void DoWork() {
Console.Write("doing work");
}
public static void Main(string[] args) {
Console.Write("running Dead");
}
}
public class DoubleDead {
private void DoTweedledee() {
DoTweedledumb();
}
private void DoTweedledumb() {
DoTweedledee();
}
public static void Main(string[] args) {
Console.Write("running DoubleDead");
}
}
[1] Standards Mapping - Security Technical Implementation Guide Version 3 - (STIG 3) APP3050 CAT II
[2] Standards Mapping - Common Weakness Enumeration - (CWE) CWE ID 561