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

Member predicate EnumConstant::hasExplicitValue

Holds if this enum constant has an explicit value. If not, its value is automatically determined by the compiler. In this example, ReadOnly has an explicit value but Shared does not have an explicit value.

enum Attribute {
  ReadOnly = 1,
  Shared
}
predicate hasExplicitValue()