CodeQL queries 1.25
Skip to end of metadata
Go to start of metadata

Finds methods that directly override 'Object.ToString'.

import csharp

from Method override, Method base
where
  base.hasName("ToString") and
  base.getDeclaringType().hasQualifiedName("System.Object") and
  base.getAnOverrider() = override
select override