470,874 Members | 1,400 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,874 developers. It's quick & easy.



If AB inherits A, then is it correct you cannot do the following:
AB = A

Jul 21 '05 #1
3 1919

If I understand what you mean, no you can't do the following

A a = new A();
AB ab = new AB();

ab = a; // won't work as you can only reference children
// or interfaces of AB, or AB itself
a = ab; // works, because AB is a "child" of A

Happy Coding!
Morten Wennevik [C# MVP]
Jul 21 '05 #2
Thanks for your reply Morten Wennevik, I was eager for one.

I posted the same quest at GotDotNet, and I found a solution, to
making AB = A achievable, through a poster. Here is the link (forum
subject: Iheritance)


Jul 21 '05 #3

Jul 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Graham Banks | last post: by
4 posts views Thread by JKop | last post: by
5 posts views Thread by Morgan Cheng | last post: by
10 posts views Thread by davidrubin | last post: by
14 posts views Thread by Steve Jorgensen | last post: by
22 posts views Thread by Matthew Louden | last post: by
45 posts views Thread by Ben Blank | last post: by
6 posts views Thread by Bart Simpson | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.