Finding all class declarations than inherit from another with Roslyn
问题 I have a CSharpCompilation instance containing an array of SyntaxTree s and I am trying to find all the class declarations that inherit from a class e.g // Not in syntax tree but referenced in project public class Base{} // In syntax tree, how to find all such classes? public class MyClass : Base {} I've tried a few things but am a bit confused with all the options and can't seem to find the right way to do this. I've tried to get the symbols but this doesn't work for inherited types