|
-
Feb 2nd, 2003, 05:03 PM
#1
Thread Starter
yay gay
Inheriting visibility
is just like in c++ possible to declare the objects of the form we're inheriting from private? like
class myClass : private myMotherClass {
}
i dont think it is possible but if it someone could point me how? i think it's a big lack .net don't support that :\
\m/  \m/
-
Feb 2nd, 2003, 05:12 PM
#2
Thread Starter
yay gay
hmm when trying it in c++.net i saw the answer to my question:
managed classes only support public inheritance
\m/  \m/
-
Feb 12th, 2003, 07:41 PM
#3
It's a nice feature of C++ but to be honest I've used it only once - what do you need it for?
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Feb 15th, 2003, 06:58 PM
#4
Thread Starter
yay gay
imagine u have a complex control and u want to make it easier..u could for example inherit from it, create methods that would turn it easier and the old ones would be hidden
\m/  \m/
-
Feb 16th, 2003, 04:40 AM
#5
That's against OOP philosophy. Write a class that contains a private member of the complex class and add methods to call through.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Feb 16th, 2003, 05:15 PM
#6
Thread Starter
yay gay
yeah i've though about that but..i think it would be nicier with private inheritance..anyways why is that against OOP philosophy? and also what did u do the only time u did private inheritance?
\m/  \m/
-
Feb 17th, 2003, 05:06 AM
#7
Can't remember what I did.
OOP philosphy says that a derived class may add functionality or change functionality, but not hide functionality.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Feb 17th, 2003, 07:20 AM
#8
Thread Starter
yay gay
ah..i see then..
ps: i mailed the support ms' C# guy and talked about private inheritance and he replied saying that he liked the idea and was going to talk to the other guy about that
\m/  \m/
-
Feb 17th, 2003, 08:38 AM
#9
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|