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

×

דני

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
 
C

Cor Ligthert[MVP]

Hi,

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

Cor
 
C

Cor Ligthert[MVP]

Hi,

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

Cor
 
H

Herfried K. Wagner [MVP]

דני 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?
 
H

Herfried K. Wagner [MVP]

דני 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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top