This inheritance causes circular dependencies between <type1> '<typename1>' and its nested <type2> '<typename2>'

An inheritance structure results in circular dependency among nested classes, that is, two classes inheriting from each other.

The following code can generate this error message.

Public Class c1
    Inherits c3.c4
    Public Class c2
    End Class
End Class
Public Class c3
    Inherits c1.c2
    Public Class c4
    End Class
End Class

In the preceding code, class c1 inherits from class c4, but c4 is nested inside c3, which inherits from c2, nested inside c1.

Error ID: BC30907

To correct this error

  • Change the inheritance structure so that there is no circular dependency.

See Also

Concepts

Inheritance Basics