|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Not inheriting members from the baseIf I recall correctly, in C++ there was an access specifier that could
label a data member of a class as "can be accessed by everyone else EXCEPT the derived class" -- an accurate opposite of "protected". I think I allude to the "friend" modifier in C++, which is different from the VB.NET "friend". Does VB.NET have any such specifier? Is there a method for a child class to "not" inherit some properties off its base class? "Water Cooler v2" <wtr_***@yahoo.com> schrieb: No.> If I recall correctly, in C++ there was an access specifier that could > label a data member of a class as "can be accessed by everyone else > EXCEPT the derived class" -- an accurate opposite of "protected". I > think I allude to the "friend" modifier in C++, which is different from > the VB.NET "friend". > > Does VB.NET have any such specifier? > Is there a method for a child class to "not" inherit some properties off Basically no, except those properties are marked as 'Private'. Then they > its base class? cannot be accessed by the derived class. -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> In this case, you'd be better off not using inheritance. Rather, create a
private class variable of the type you would have inherited from. If the base class is marked "must-inherit", create a private class type inside your class and then create a variable of your intermediate class type. Doing this will block any inheritance from passing from the base class up through your class. Mike Ober. Show quoteHide quote "Water Cooler v2" <wtr_***@yahoo.com> wrote in message news:1147762218.579520.106020@j73g2000cwa.googlegroups.com... > If I recall correctly, in C++ there was an access specifier that could > label a data member of a class as "can be accessed by everyone else > EXCEPT the derived class" -- an accurate opposite of "protected". I > think I allude to the "friend" modifier in C++, which is different from > the VB.NET "friend". > > Does VB.NET have any such specifier? Is there a method for a child > class to "not" inherit some properties off its base class? >
eventlog monitoring
Change Screen Resolution in VB.NET????? indirectly setting a property of a class can I write a select ..where.. against a table in a dataset? force next iteration in for...next excel range: how to tell it to move one row down? How many jobs are waiting in the printer's queue Help needed to locate Documentation Authoring Tool for VB.Net 2.0 How to get Actual field name from TextBox Control WMI - Win32_LogicalDisk - Status |
|||||||||||||||||||||||