why Value of type '.c' cannot be converted to '.d(Of .b(Of .a))

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

דני

Public Class Form1
Public Class a
End Class

Public Class b(Of T As a)
End Class

Public Class c
Inherits b(Of a)
End Class

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

Dim r As d(Of b(Of a)) = New c
End Class
 
Hi,

It is a little bit abstract to me, can you give a kind of real world example
where this is needed?

Cor
 
Hi,

It is a little bit abstract to me, can you give a kind of real world example
where this is needed?

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

Public Class b(Of T As a)
End Class

Public Class c
Inherits b(Of a)
End Class

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

Dim r As d(Of b(Of a)) = New c
End Class


They cannot be converted because they are different types. What would you
expect?
 
דני said:
Public Class Form1
Public Class a
End Class

Public Class b(Of T As a)
End Class

Public Class c
Inherits b(Of a)
End Class

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

Dim r As d(Of b(Of a)) = New c
End Class


They cannot be converted because they are different types. What would you
expect?
 
Back
Top