Click here to Skip to main content
16,005,236 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: i want urgent reply Pin
Dave Kreskowiak21-Jan-09 3:39
mveDave Kreskowiak21-Jan-09 3:39 
AnswerRe: i want urgent reply Pin
Eddy Vluggen21-Jan-09 3:42
professionalEddy Vluggen21-Jan-09 3:42 
AnswerRe: i want urgent reply Pin
leckey21-Jan-09 3:46
leckey21-Jan-09 3:46 
GeneralRe: i want urgent reply Pin
MidwestLimey21-Jan-09 6:43
professionalMidwestLimey21-Jan-09 6:43 
AnswerRe: i want urgent reply Pin
0x3c021-Jan-09 6:33
0x3c021-Jan-09 6:33 
AnswerRe: i want urgent reply Pin
Steven J Jowett22-Jan-09 5:21
Steven J Jowett22-Jan-09 5:21 
AnswerRe: i want urgent reply Pin
darkelv22-Jan-09 18:20
darkelv22-Jan-09 18:20 
QuestionInheritance Advice Needed Pin
Jay Royall21-Jan-09 0:15
Jay Royall21-Jan-09 0:15 
Hi all,

Lets say I have 3 classes which all share many attributes as well as having there own specific attributes. I realise that the thing to do is to have the 3 classes inherit, from a parent class, the shared attributes.

Now, say 2 of the classes also share some attributes but the third one does not, should I I place these attributes in each child class or place them in the parent class?

Obviously, placing them in the child classes will mean duplication of the varaibles, properties and any methods which act on these properties. But putting them in the parent class will mean that the third class, which does not require these attributes, will have access to them. Is this a problem?

I realise that I could in fact have another class between the child classes which share these extra attributes and the parent class, but this seems a little eloaborate when there are probably only 3 attributes to share.

Any advice is appreciated. Thanks.
AnswerRe: Inheritance Advice Needed Pin
Mustafa Ismail Mustafa21-Jan-09 1:42
Mustafa Ismail Mustafa21-Jan-09 1:42 
GeneralRe: Inheritance Advice Needed Pin
Jay Royall21-Jan-09 2:28
Jay Royall21-Jan-09 2:28 
GeneralRe: Inheritance Advice Needed Pin
Mustafa Ismail Mustafa21-Jan-09 2:34
Mustafa Ismail Mustafa21-Jan-09 2:34 
GeneralRe: Inheritance Advice Needed Pin
Jay Royall21-Jan-09 2:46
Jay Royall21-Jan-09 2:46 
GeneralRe: Inheritance Advice Needed Pin
Mustafa Ismail Mustafa21-Jan-09 3:05
Mustafa Ismail Mustafa21-Jan-09 3:05 
GeneralRe: Inheritance Advice Needed Pin
Jay Royall21-Jan-09 3:25
Jay Royall21-Jan-09 3:25 
GeneralRe: Inheritance Advice Needed Pin
Mustafa Ismail Mustafa21-Jan-09 4:35
Mustafa Ismail Mustafa21-Jan-09 4:35 
AnswerRe: Inheritance Advice Needed Pin
Jon_Boy21-Jan-09 2:13
Jon_Boy21-Jan-09 2:13 
GeneralRe: Inheritance Advice Needed Pin
Jay Royall21-Jan-09 2:32
Jay Royall21-Jan-09 2:32 
GeneralRe: Inheritance Advice Needed Pin
Mustafa Ismail Mustafa21-Jan-09 2:37
Mustafa Ismail Mustafa21-Jan-09 2:37 
GeneralRe: Inheritance Advice Needed Pin
Ray Cassick21-Jan-09 4:28
Ray Cassick21-Jan-09 4:28 
Answersimple pedigree, no interfaces Pin
Luc Pattyn21-Jan-09 3:02
sitebuilderLuc Pattyn21-Jan-09 3:02 
GeneralRe: simple pedigree, no interfaces Pin
Jay Royall21-Jan-09 3:22
Jay Royall21-Jan-09 3:22 
GeneralRe: simple pedigree, no interfaces Pin
Luc Pattyn21-Jan-09 3:33
sitebuilderLuc Pattyn21-Jan-09 3:33 
Questionpermission denied while deleting folder Pin
jishbalan20-Jan-09 23:04
jishbalan20-Jan-09 23:04 
AnswerRe: permission denied while deleting folder Pin
EliottA21-Jan-09 2:43
EliottA21-Jan-09 2:43 
GeneralRe: permission denied while deleting folder Pin
Luc Pattyn21-Jan-09 3:10
sitebuilderLuc Pattyn21-Jan-09 3:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.