Click here to Skip to main content
15,928,404 members
Home / Discussions / C#
   

C#

 
GeneralRe: Class "Child" MUST NOT call "Euthanize" on class "Dog" Pin
Dave Kreskowiak27-Mar-07 12:43
mveDave Kreskowiak27-Mar-07 12:43 
GeneralRe: Class "Child" MUST NOT call "Euthanize" on class "Dog" Pin
Leslie Sanford27-Mar-07 10:26
Leslie Sanford27-Mar-07 10:26 
GeneralRe: Class "Child" MUST NOT call "Euthanize" on class "Dog" Pin
Edmundisme27-Mar-07 10:27
Edmundisme27-Mar-07 10:27 
AnswerRe: Class "Child" MUST NOT call "Euthanize" on class "Dog" Pin
Leslie Sanford27-Mar-07 10:22
Leslie Sanford27-Mar-07 10:22 
GeneralRe: Class "Child" MUST NOT call "Euthanize" on class "Dog" Pin
Edmundisme27-Mar-07 10:36
Edmundisme27-Mar-07 10:36 
GeneralRe: Class "Child" MUST NOT call "Euthanize" on class "Dog" Pin
Leslie Sanford27-Mar-07 10:47
Leslie Sanford27-Mar-07 10:47 
GeneralRe: Class "Child" MUST NOT call "Euthanize" on class "Dog" Pin
Edmundisme27-Mar-07 11:49
Edmundisme27-Mar-07 11:49 
GeneralRe: Class "Child" MUST NOT call "Euthanize" on class "Dog" Pin
led mike28-Mar-07 5:21
led mike28-Mar-07 5:21 
Edmundisme wrote:
because my problem doesn't exactly fit the metaphor.


Obviously since a Child would have a Dog instance not an IPlayable instance. In your real problem the Child would have an IPlayable instance and "should not" cast it to Dog since it could be a Cat. Upcasting is indicative of bad design. Languages do not protect against bad design or bad use. A Client should "read" a socket not "close" it, but nothing stops the developer from writing bad code that closes the socket, then he posts a message on CodeProject "Help Urgent why my code not work".

Edmundisme wrote:
We are actually using a type like you suggest as the key


I would not advise a Rube Goldberg[^] design as an attempt to thwart bad developers from abusing a good design. Two wrongs don't make a right.


led mike

GeneralRe: Class "Child" MUST NOT call "Euthanize" on class "Dog" Pin
Edmundisme28-Mar-07 6:15
Edmundisme28-Mar-07 6:15 
GeneralRe: Class "Child" MUST NOT call "Euthanize" on class "Dog" Pin
Edmundisme28-Mar-07 6:30
Edmundisme28-Mar-07 6:30 
GeneralRe: Class "Child" MUST NOT call "Euthanize" on class "Dog" Pin
led mike28-Mar-07 6:52
led mike28-Mar-07 6:52 
GeneralRe: Class "Child" MUST NOT call "Euthanize" on class "Dog" Pin
Edmundisme28-Mar-07 7:21
Edmundisme28-Mar-07 7:21 
QuestionAppDomains & Loading Assemblies Pin
AJ12327-Mar-07 9:19
AJ12327-Mar-07 9:19 
AnswerRe: AppDomains & Loading Assemblies Pin
S. Senthil Kumar27-Mar-07 17:01
S. Senthil Kumar27-Mar-07 17:01 
Questionchange hue saturation Pin
samreengr827-Mar-07 9:03
samreengr827-Mar-07 9:03 
QuestionMultiplayer game Pin
Fco. Javier Marin27-Mar-07 8:50
Fco. Javier Marin27-Mar-07 8:50 
QuestionC# XmlReader Pin
lost in transition 27-Mar-07 8:20
lost in transition 27-Mar-07 8:20 
AnswerRe: C# XmlReader Pin
Not Active27-Mar-07 8:26
mentorNot Active27-Mar-07 8:26 
GeneralRe: C# XmlReader Pin
lost in transition 27-Mar-07 8:30
lost in transition 27-Mar-07 8:30 
AnswerRe: C# XmlReader Pin
Ennis Ray Lynch, Jr.27-Mar-07 8:48
Ennis Ray Lynch, Jr.27-Mar-07 8:48 
AnswerRe: C# XmlReader Pin
Austin Harris27-Mar-07 9:08
Austin Harris27-Mar-07 9:08 
AnswerRe: C# XmlReader Pin
BoneSoft27-Mar-07 9:44
BoneSoft27-Mar-07 9:44 
QuestionHow to sort ListView items of some column. Pin
Saikek27-Mar-07 8:11
Saikek27-Mar-07 8:11 
AnswerRe: How to sort ListView items of some column. Pin
BoneSoft27-Mar-07 9:52
BoneSoft27-Mar-07 9:52 
AnswerRe: How to sort ListView items of some column. Pin
rahvyn627-Mar-07 9:54
rahvyn627-Mar-07 9:54 

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.