If the Parent property is actually a common property of all descendants and always a good CategoryNode, this is not a problem. Semantically this is correct and technically, I think it is correct as soon as you stay in the same library (to avoid circular links).
This can be a problem when writing code as follows:
// BAD CODE if(myProp is subclassA) { ... } else if (myProp is syubclassB) { ... }
This code is bad because you are losing the advantage of inheritance.
Even the .NET Framework has such constructs . The first example that comes to my mind is the XObject.Parent property.
XElement inherits XObject, and XObject publishes a property of type XElement. Same as your fragment.
Steve b
source share