How to equal sub class from base class

  • Thread starter Thread starter Steven.Xu
  • Start date Start date
S

Steven.Xu

I have an instance B of class C1. How can i let variable
BB which class inherits from C1 equal from B in VB.NET?

For example:

Public Class C1
' ...
End Class

Public Class CC1
Inherits C1
' ...
End Class

Public Sub Main()
Dim B as new C1;
Dim BB as CC1;

' How to realize BB = B?

End Sub

My mail address is: (e-mail address removed)
 
If TypeOf CC Is BB

Regards - OHM

Steven.Xu said:
I have an instance B of class C1. How can i let variable
BB which class inherits from C1 equal from B in VB.NET?

For example:

Public Class C1
' ...
End Class

Public Class CC1
Inherits C1
' ...
End Class

Public Sub Main()
Dim B as new C1;
Dim BB as CC1;

' How to realize BB = B?

End Sub

My mail address is: (e-mail address removed)
 
Damn, I missed the absence of the 'New' keyword. Well spotted CM.

Regards - OHM
 
Back
Top