I have a Class that is defined as
Public MustInherit Class Entity(Of T As Entity(Of T))
And various classes derived from it. I would like to have another class accept all of the derived objects as a property, but I cannot seeem to find a workable syntax. If it were a parameter of a sub, I could say
Public Sub Foo(T As Entity(Of T))(TheEntity As T)
I can't seem to get that to work for a property:
Public Property E(Of Entity(Of T))() As Entity(Of T)
Gives me "Type parameters cannot be specified on this declaration"
Public Property E() As Entity2008(Of T)
Gives me "Type Parameter T does not inherit from or implement the constraint type ..."
Is there an acceptable way to do this or am I stuck with using a Set Sub and a Get Function?