471,321 Members | 2,076 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,321 software developers and data experts.

Is it possible to create virtual class to force the class must inherited?

ABC
as subject.

I have two classes, one is sealed class that will call or access the another
class properties or methods. But, now, the another class is for future use
and unknow what properties will add. I don't want to modify sealed class
when the another class properties or new methods added. Is there any best
strategies?
Jan 11 '06 #1
1 1046
ABC wrote:
I have two classes, one is sealed class that will call or access the another
class properties or methods. But, now, the another class is for future use
and unknow what properties will add. I don't want to modify sealed class
when the another class properties or new methods added. Is there any best
strategies?


It's not entirely clear what you mean, but I *suspect* you're after
interfaces or abstract classes. You put in the interface (or abstract
class) all the things that the sealed class cares about, and then that
can be implemented/derived from by other classes.

Jon

Jan 11 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by vijay | last post: by
16 posts views Thread by BCC | last post: by
24 posts views Thread by Shao Zhang | last post: by
8 posts views Thread by Karsten Schramm | last post: by
6 posts views Thread by newbie | last post: by
1 post views Thread by Tony Johansson | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.