Writing an asp.net mvc application and I have something like this ...
Public Class AA
'... has some variables...
End Class
Public Class BB
Inherits AA
Public ExtraVariable As Integer ' just adds another variable and thats it!
End Class
So now in my program I just want to copy an object of type AA to an empty variable of type BB?
it makes sense to do this, since I expect that all fields in an object of type A will be copied to a newly created object of type BB, and ExtraVariable in an object of type BB I will (will) just assign it a value later (after the copy) in due time!
I know that copying type BB to type AA would be inappropriate since data was lost!
But I'm trying to copy AA to BB, I used both DirectCast, and CTypeto do this, and I keep getting the error "impossible to execute" !!!
. vb.net( #, )