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

Member predicate LocalScopeVariable::getACapturingCallable

Gets a callable that captures this variable, if any. For example, v is captured by the nested lambda expression in

void M() {
  var v = "captured";
  Action a = () => {
    System.Console.WriteLine(v);
  }
}
Callable getACapturingCallable()