Click here to Skip to main content
15,926,596 members
Home / Discussions / C#
   

C#

 
QuestionQuestion about polymorphism.. Pin
e-laj1-Apr-06 5:52
e-laj1-Apr-06 5:52 
AnswerRe: Question about polymorphism.. Pin
leppie1-Apr-06 6:07
leppie1-Apr-06 6:07 
GeneralRe: Question about polymorphism.. Pin
ricardojb1-Apr-06 12:04
ricardojb1-Apr-06 12:04 
NewsRe: Question about polymorphism.. Pin
leppie1-Apr-06 16:40
leppie1-Apr-06 16:40 
GeneralRe: Question about polymorphism.. Pin
ricardojb1-Apr-06 16:43
ricardojb1-Apr-06 16:43 
GeneralRe: Question about polymorphism.. Pin
leppie1-Apr-06 17:00
leppie1-Apr-06 17:00 
GeneralRe: Question about polymorphism.. Pin
ricardojb1-Apr-06 17:03
ricardojb1-Apr-06 17:03 
GeneralRe: Question about polymorphism.. Pin
ricardojb1-Apr-06 17:13
ricardojb1-Apr-06 17:13 
I missed something important, interface members have to be public and therefore will be visible to the child classes.

The answer will be that it will work up to the second generation, not beyond, if it's a requirement that classes have to inherit Class3 then it can't be done through design and needs some other solution.

If the requirement is to only inherit from the second class, then all childer classes can be sealed to force to inherit from Class2 or Class1 but not from Class3 and beyond.

Reflection would not be a solution because it would enforce it at runtime, not compile time, basically it would simply throw an error if the separate implementation is not there but it would compile fine.

-- modified at 23:14 Saturday 1st April, 2006
GeneralRe: Question about polymorphism.. Pin
leppie1-Apr-06 23:26
leppie1-Apr-06 23:26 
GeneralRe: Question about polymorphism.. Pin
ricardojb1-Apr-06 17:01
ricardojb1-Apr-06 17:01 
QuestionHelp me please.. Pin
KORCARI1-Apr-06 5:38
KORCARI1-Apr-06 5:38 
AnswerRe: Help me please.. Pin
ricardojb1-Apr-06 11:43
ricardojb1-Apr-06 11:43 
QuestionC# & Sound Function Pin
hung_ngole1-Apr-06 5:08
hung_ngole1-Apr-06 5:08 
QuestionSpell checker for microsoft word Pin
iinfoque1-Apr-06 4:00
iinfoque1-Apr-06 4:00 
AnswerRe: Communicating with a USB Device Pin
leppie1-Apr-06 2:55
leppie1-Apr-06 2:55 
QuestionSudoku 4 Mobile phone Pin
t4ure4n1-Apr-06 1:43
t4ure4n1-Apr-06 1:43 
QuestionDisplaying 0\0 Pin
thepersonof1-Apr-06 1:42
thepersonof1-Apr-06 1:42 
AnswerRe: Displaying 0\0 Pin
Nicholas Butler1-Apr-06 1:45
sitebuilderNicholas Butler1-Apr-06 1:45 
GeneralRe: Displaying 0\0 Pin
thepersonof1-Apr-06 2:29
thepersonof1-Apr-06 2:29 
GeneralRe: Displaying 0\0 Pin
leppie1-Apr-06 3:02
leppie1-Apr-06 3:02 
AnswerRe: Displaying 0\0 Pin
Guffa1-Apr-06 4:40
Guffa1-Apr-06 4:40 
GeneralRe: Displaying 0\0 Pin
thepersonof1-Apr-06 4:59
thepersonof1-Apr-06 4:59 
GeneralRe: Displaying 0\0 Pin
thepersonof1-Apr-06 6:42
thepersonof1-Apr-06 6:42 
QuestionInconsistant accesibility Pin
thepersonof1-Apr-06 0:37
thepersonof1-Apr-06 0:37 
Questioncreat a find tool in text editor? Pin
abdelhameed8131-Mar-06 23:56
abdelhameed8131-Mar-06 23:56 

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.