Click here to Skip to main content
15,896,606 members
Home / Discussions / Visual Basic
   

Visual Basic

 
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 
Liqz wrote:
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?


If it doesn't sound right or seems like your copying and pasting the same code into multiple classes......then it probably isn't right.

Place them in the 'parent' class. There is no need to re-duplicate logic. You can inherit the class and use the mybase keyword.

Cheers!

Any suggestions, ideas, or 'constructive criticism' are always welcome.

"There's no such thing as a stupid question, only stupid people." - Mr. Garrison

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 
GeneralRe: permission denied while deleting folder Pin
jishbalan21-Jan-09 17:25
jishbalan21-Jan-09 17:25 
QuestionRe: permission denied while deleting folder Pin
Eddy Vluggen22-Jan-09 1:22
professionalEddy Vluggen22-Jan-09 1:22 
AnswerRe: permission denied while deleting folder Pin
jishbalan22-Jan-09 18:17
jishbalan22-Jan-09 18:17 
Questionautomation error Pin
subramanyeswari20-Jan-09 22:42
subramanyeswari20-Jan-09 22:42 
AnswerRe: automation error Pin
Mustafa Ismail Mustafa20-Jan-09 22:56
Mustafa Ismail Mustafa20-Jan-09 22:56 
GeneralRe: automation error Pin
Tom Deketelaere21-Jan-09 0:01
professionalTom Deketelaere21-Jan-09 0:01 
GeneralRe: automation error Pin
Mustafa Ismail Mustafa21-Jan-09 1:38
Mustafa Ismail Mustafa21-Jan-09 1:38 
GeneralRe: automation error Pin
Tom Deketelaere21-Jan-09 1:48
professionalTom Deketelaere21-Jan-09 1:48 

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.