Click here to Skip to main content
15,919,749 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to invoke an event using reflection? Pin
Daniel Grunwald24-Oct-06 10:58
Daniel Grunwald24-Oct-06 10:58 
GeneralRe: How to invoke an event using reflection? Pin
Super Lloyd24-Oct-06 12:53
Super Lloyd24-Oct-06 12:53 
QuestionHow to parse generic numeric string Pin
kumar.bs23-Oct-06 19:35
kumar.bs23-Oct-06 19:35 
AnswerRe: How to parse generic numeric string Pin
Martin#23-Oct-06 19:59
Martin#23-Oct-06 19:59 
QuestionHow to Manage Registry Key Pin
Siamginsuan Ngaihte23-Oct-06 18:38
Siamginsuan Ngaihte23-Oct-06 18:38 
QuestionURGENT-----How to read default values of Registry Pin
HotGene23-Oct-06 17:33
HotGene23-Oct-06 17:33 
QuestionProper use of interfaces - Composite design pattern Pin
Goebel23-Oct-06 13:40
Goebel23-Oct-06 13:40 
AnswerRe: Proper use of interfaces - Composite design pattern Pin
Edbert P23-Oct-06 14:10
Edbert P23-Oct-06 14:10 
IMO if you want to restrict only certain objects to be added to the Add() function, then you should actually create different overloads of the function that accepts only the child classes you want.

If you have a function that accepts objects from base class then by logic it is correct for objects from inheriting child classes to be passed to the function. To use interface only to prevent this sort of things is - to me - a wrong thing to do. Is there any reason you don't want to create multiple overloads instead? (These functions can in turn call your private Add() function).


"A democracy is nothing more than mob rule, where fifty-one percent of the people may take away the rights of the other forty-nine." - Thomas Jefferson

"Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote." - Benjamin Franklin

Edbert
Sydney, Australia

QuestionRe: Proper use of interfaces - Composite design pattern Pin
Goebel23-Oct-06 22:59
Goebel23-Oct-06 22:59 
AnswerRe: Proper use of interfaces - Composite design pattern Pin
Edbert P24-Oct-06 14:59
Edbert P24-Oct-06 14:59 
QuestionSendMail Pin
1010210623-Oct-06 13:27
1010210623-Oct-06 13:27 
AnswerRe: SendMail Pin
grivix26-Oct-06 12:51
grivix26-Oct-06 12:51 
QuestionSet 'visible' property to 'false' for all the opened forms Pin
AngryC23-Oct-06 12:51
AngryC23-Oct-06 12:51 
AnswerRe: Set 'visible' property to 'false' for all the opened forms Pin
Stefan Troschuetz23-Oct-06 21:42
Stefan Troschuetz23-Oct-06 21:42 
GeneralRe: Set 'visible' property to 'false' for all the opened forms Pin
AngryC25-Oct-06 11:03
AngryC25-Oct-06 11:03 
GeneralRe: Set 'visible' property to 'false' for all the opened forms Pin
Stefan Troschuetz25-Oct-06 16:33
Stefan Troschuetz25-Oct-06 16:33 
AnswerRe: Set 'visible' property to 'false' for all the opened forms Pin
MGoettmann24-Oct-06 4:06
MGoettmann24-Oct-06 4:06 
GeneralRe: Set 'visible' property to 'false' for all the opened forms Pin
AngryC25-Oct-06 11:03
AngryC25-Oct-06 11:03 
AnswerRe: Set 'visible' property to 'false' for all the opened forms Pin
MGoettmann25-Oct-06 12:14
MGoettmann25-Oct-06 12:14 
GeneralRe: Set 'visible' property to 'false' for all the opened forms Pin
AngryC26-Oct-06 11:50
AngryC26-Oct-06 11:50 
GeneralRe: Set 'visible' property to 'false' for all the opened forms Pin
MGoettmann27-Oct-06 5:11
MGoettmann27-Oct-06 5:11 
GeneralRichTextBox Pin
1010210623-Oct-06 12:29
1010210623-Oct-06 12:29 
GeneralRe: RichTextBox Pin
1010210623-Oct-06 12:43
1010210623-Oct-06 12:43 
QuestionC # 3 in net framework 3 package? Pin
SJ_Phoenix23-Oct-06 7:53
SJ_Phoenix23-Oct-06 7:53 
AnswerRe: C # 3 in net framework 3 package? Pin
S. Senthil Kumar23-Oct-06 7:58
S. Senthil Kumar23-Oct-06 7:58 

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.