Me As Child Type

Posted by Steven on Stack Overflow See other posts from Stack Overflow or by Steven
Published on 2010-04-15T20:13:03Z Indexed on 2010/04/15 20:23 UTC
Read the original article Hit count: 343

Filed under:
|
|

I have a MustInherit Parent class with two Child classes which Inherit from the Parent.

How can I use (or Cast) Me in a Parent function as the the child type of that instance?

EDIT: My actual goal is to be able to serialize (BinaryFormatter.Serialize(Stream, Object)) either of my child classes. However, "repeating the code" in each child "seems" wrong.

© Stack Overflow or respective owner

Related posts about vb.net

Related posts about inheritance