×
×“× ×™
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
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