How to check if class A is subclass of class B in code generator?

For example, I have class A {}, class B : A {}, class C : B {}, how do I determine that class C is subclass of A using ClassDeclarationSyntax?
Was this page helpful?