CodeQL library for C#
codeql/csharp-all 0.8.12 (changelog, source)
Search

Member predicate ConstructorInitializer::getTarget

Gets the static (compile-time) target of this call. For example, the static target of x.M() on line 9 is A.M in

class A {
  virtual void M() { }
}

class B : A {
  override void M() { }

  static void CallM(A x) {
    x.M();
  }
}

Use getARuntimeTarget() instead to get a potential run-time target (will include B.M in the example above).

Constructor getTarget()