You're having a circular reference problem. BaseObjClass
implements IInspRev
, which in turn depends on BaseObjClass
. Compiler gets in a "chicken or egg" situation and hence fails.
A better way to define your GetChildrenCollection
inside IInspRev
method would likely be this:
Readonly Property Childrens() As ICollection(Of IInspRev)
If you don't need the interface to be able to add, remove or replace childs, this will be even better:
Readonly Property Childrens As IEnumerable(Of IInspRev)
Note that I made it a readonly property rather than a method. This way of exposing a collection of child objects is preferred in .NET universe.