473,403 Members | 2,366 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

about inherits

Tom
Can I inherits private class in public class vb.net ?

if can't , how can I do that ? such that I want to hidden some class in
project
Nov 21 '05 #1
6 991
Are you looking for protected classes by any chance??

Rgds,
Anand
http://www.dotnetindia.com

"Tom" wrote:
Can I inherits private class in public class vb.net ?

if can't , how can I do that ? such that I want to hidden some class in
project

Nov 21 '05 #2
Tom,

Don't you make from your private class, if you inherit that in your public
class, directly from that a public class?

I hope this helps,

Cor
Nov 21 '05 #3
"Tom" <pc***@tomgroup.com> schrieb:
Can I inherits private class in public class vb.net ?

if can't , how can I do that ? such that I want to hidden some class in
project


You cannot. If a class is 'Public', its base class must be public too.
What you can do is putting the code in a 'Friend' class and use this class
in your public class.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #4
Herfried,

Before I write something wrong. What do yo mean with this?
What you can do is putting the code in a 'Friend' class and use this class
in your public class.


Cor
Nov 21 '05 #5
Cor,

"Cor Ligthert" <no************@planet.nl> schrieb:
Before I write something wrong. What do yo mean with this?
What you can do is putting the code in a 'Friend' class and use this
class in your public class.


\\\
Public Class Foo
Public Sub Bla()
Dim i As New ImplementationDetail()
i.Goo()
...
End Sub
End Class

Friend Class ImplementationDetail
Public Sub Goo()
...
End Sub
End Class
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #6
Herfried,
Before I write something wrong. What do yo mean with this?
What you can do is putting the code in a 'Friend' class and use this
class in your public class.

Than I have nothing to say. It was the word "Use", however I was not sure
what you meant with that. Now it is for the OP as well clear that it is not
a use as inheriting however instancing.

:-)

Cor
Nov 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Quentin Huo | last post by:
Hi: C# doesn't support multiple inheritance but it supports interface.But I think these ways are different. For example, C++ supports multiple inheritance. I have two classess classA and...
1
by: Ing. Rajesh Kumar | last post by:
Hello Everybody I just started to use VS.NET. I came to know that it only allows to use code behind. I normally use one *.aspx file but does not matter. I can start using Code Behind, but what I do...
3
by: SAI | last post by:
I have 2 files which are copied from Microsoft for testing code behind. But always show error "Parser Error Message: Could not load type 'MyClass'." and highlight the aspx file code, Is my server...
1
by: Roberto Bindini | last post by:
Hi with visual studio 2005 beta 2 i have created two form: frm1 (Inherits System.Web.UI.Page) frm2 (Inherits frm1) but in the line code : Inherits frm1 vs send error: type frm1 is not defined
10
by: Tony Abate | last post by:
I am working on an ASP.NET app that is going well except for one thing. I build my application and then move the .aspx file to a different directory. I can point the Codebehind property back to the...
2
by: Don | last post by:
1. Say I have three classes: A, B and C. 2. Class A can only be inherited, and B inherits it. C does not inherit anything. 3. I have a function that can have an object passed to it. Either B...
6
by: Ioannis Theoharis | last post by:
Hi, i have 3 tables calling father, child1, child2: create table father(att0 int4); create table child1() inherits(father); create table child2() inherits(father); i want to get all the...
161
by: KraftDiner | last post by:
I was under the assumption that everything in python was a refrence... so if I code this: lst = for i in lst: if i==2: i = 4 print lst I though the contents of lst would be modified.....
3
by: Showjumper | last post by:
Back in asp.net 1.1 i made custom collection classes per Karl Seguin's article On the Way to Mastering ASP.NET: Introducing Custom Entity Classes to take advantage of strongly typed data. Now with...
10
by: =?Utf-8?B?RGFuaQ==?= | last post by:
Hi, Trying to create a master page that holds a menu, and the menu switches between pages in the site. 2 problem arrosed: a. When I navigate from page to page (all AJAX Web Forms, with the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.