why not c1 or c2 not inherit from type 'b(Of a)'.

  • Thread starter Thread starter דני
  • Start date Start date
×

דני

Public Class Form1
Public Class a

End Class
Public Class a1
Inherits a
End Class
Public Class a2
Inherits a
Private dsfs As d(Of c2) 'err Error 1 Type argument 'c2' does
not inherit from or implement the constraint type 'b(Of a)'.

End Class
Public Class b(Of T As a)

End Class

Public Class c
Inherits b(Of a)

End Class
Public Class c1
Inherits b(Of a)

End Class
Public Class c2
Inherits b(Of a1)

End Class
Public Class c3
Inherits b(Of a2)

End Class
Public Class d(Of T As b(Of a))

End Class
Dim r As New d(Of c3) 'err Error 1 Type argument 'c2' does not
inherit from or implement the constraint type 'b(Of a)'.

Dim r1 As New d(Of c) 'ok

End Class
 
דני said:
Public Class Form1
Public Class a

End Class
Public Class a1
Inherits a
End Class
Public Class a2
Inherits a
Private dsfs As d(Of c2) 'err Error 1 Type argument 'c2' does
not inherit from or implement the constraint type 'b(Of a)'.

End Class
Public Class b(Of T As a)

End Class

Public Class c
Inherits b(Of a)

End Class
Public Class c1
Inherits b(Of a)

End Class
Public Class c2
Inherits b(Of a1)

End Class
Public Class c3
Inherits b(Of a2)

End Class
Public Class d(Of T As b(Of a))

End Class
Dim r As New d(Of c3) 'err Error 1 Type argument 'c2' does not
inherit from or implement the constraint type 'b(Of a)'.

Dim r1 As New d(Of c) 'ok

End Class


I think this is the same as your other question, but I haven't tried that
hard to compare. See if my previous answer helps.
 
דני said:
Public Class Form1
Public Class a

End Class
Public Class a1
Inherits a
End Class
Public Class a2
Inherits a
Private dsfs As d(Of c2) 'err Error 1 Type argument 'c2' does
not inherit from or implement the constraint type 'b(Of a)'.

End Class
Public Class b(Of T As a)

End Class

Public Class c
Inherits b(Of a)

End Class
Public Class c1
Inherits b(Of a)

End Class
Public Class c2
Inherits b(Of a1)

End Class
Public Class c3
Inherits b(Of a2)

End Class
Public Class d(Of T As b(Of a))

End Class
Dim r As New d(Of c3) 'err Error 1 Type argument 'c2' does not
inherit from or implement the constraint type 'b(Of a)'.

Dim r1 As New d(Of c) 'ok

End Class


I think this is the same as your other question, but I haven't tried that
hard to compare. See if my previous answer helps.
 
Back
Top