By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,815 Members | 1,066 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,815 IT Pros & Developers. It's quick & easy.

classes

P: n/a
Hi,

class X, subclasses A, B and C inherit X. I don't want class X available to
the outside world, only A, B and C. How do I declare that?
Thanks in advance
Frank
Nov 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Public MustInherit Class X

I think it is always a ggod idea to also protect any constructors in this
class. I.e.

Protected Sub New(...)
"Frank" <fr***@frank.com> wrote in message
news:ce**********@news2.tilbu1.nb.home.nl...
Hi,

class X, subclasses A, B and C inherit X. I don't want class X available to the outside world, only A, B and C. How do I declare that?
Thanks in advance
Frank

Nov 20 '05 #2

P: n/a
Whatever the VB equivalent of Java's "Abstract" class - is what you're
looking for - you can't instantiate it, but you can inherit it.

"Frank" <fr***@frank.com> wrote in message
news:ce**********@news2.tilbu1.nb.home.nl...
Hi,

class X, subclasses A, B and C inherit X. I don't want class X available to the outside world, only A, B and C. How do I declare that?
Thanks in advance
Frank

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.732 / Virus Database: 486 - Release Date: 7/29/2004
Nov 20 '05 #3

P: n/a
That would be MustInherit

--
Jonathan Allen
"Hal Rosser" <hm******@bellsouth.net> wrote in message
news:qC***************@bignews2.bellsouth.net...
Whatever the VB equivalent of Java's "Abstract" class - is what you're
looking for - you can't instantiate it, but you can inherit it.

Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.