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

Member predicate Property::isAutoImplemented

Holds if this property is automatically implemented. For example, P1 on line 2 is automatically implemented, while P2 on line 5 is not in

class C {
  public int P1 { get; set; }

  int p2;
  public int P2 {
    get { return p2; }
    set { p2 = value; }
  }
}

Note that this information is only available for properties in source code.

predicate isAutoImplemented()