Click here to Skip to main content
15,908,115 members
Home / Discussions / C#
   

C#

 
AnswerRe: Factory Pattern... Why? Pin
Sascha Lefèvre6-Apr-15 9:33
professionalSascha Lefèvre6-Apr-15 9:33 
GeneralRe: Factory Pattern... Why? Pin
harold aptroot6-Apr-15 9:54
harold aptroot6-Apr-15 9:54 
It can be as simple as a function that returns a new instance of something. The point is that it's more flexible than a constructor. It can choose which type to return an instance of, and it can be overridden in ways that a constructor can not be. It's often abused, to the point that many people cringe upon seeing the word "factory", but it's useful sometimes. It's one of those patterns (well, aren't they all) that you've probably invented yourself before even learning it was a pattern and had a name.

GeneralRe: Factory Pattern... Why? Pin
Kevin Marois6-Apr-15 9:58
professionalKevin Marois6-Apr-15 9:58 
GeneralRe: Factory Pattern... Why? Pin
harold aptroot6-Apr-15 10:09
harold aptroot6-Apr-15 10:09 
AnswerRe: Factory Pattern... Why? Pin
CHill606-Apr-15 9:57
mveCHill606-Apr-15 9:57 
AnswerRe: Factory Pattern... Why? Pin
Abhinav S6-Apr-15 16:52
Abhinav S6-Apr-15 16:52 
AnswerRe: Factory Pattern... Why? Pin
Eddy Vluggen6-Apr-15 21:41
professionalEddy Vluggen6-Apr-15 21:41 
AnswerRe: Factory Pattern... Why? Pin
Nathan Minier8-Apr-15 2:30
professionalNathan Minier8-Apr-15 2:30 
GeneralRe: Factory Pattern... Why? Pin
BillWoodruff9-Apr-15 9:27
professionalBillWoodruff9-Apr-15 9:27 
GeneralRe: Factory Pattern... Why? Pin
Nathan Minier13-Apr-15 1:54
professionalNathan Minier13-Apr-15 1:54 
QuestionReading and storing application settings in an object at startup Pin
Member 115846886-Apr-15 6:44
Member 115846886-Apr-15 6:44 
AnswerRe: Reading and storing application settings in an object at startup Pin
Gerry Schmitz6-Apr-15 12:27
mveGerry Schmitz6-Apr-15 12:27 
GeneralRe: Reading and storing application settings in an object at startup Pin
Member 115846887-Apr-15 4:57
Member 115846887-Apr-15 4:57 
GeneralRe: Reading and storing application settings in an object at startup Pin
Gerry Schmitz7-Apr-15 9:06
mveGerry Schmitz7-Apr-15 9:06 
GeneralRe: Reading and storing application settings in an object at startup Pin
Member 115846887-Apr-15 8:54
Member 115846887-Apr-15 8:54 
GeneralRe: Reading and storing application settings in an object at startup Pin
Gerry Schmitz7-Apr-15 10:30
mveGerry Schmitz7-Apr-15 10:30 
GeneralRe: Reading and storing application settings in an object at startup Pin
Member 115846888-Apr-15 2:43
Member 115846888-Apr-15 2:43 
GeneralRe: Reading and storing application settings in an object at startup Pin
Gerry Schmitz8-Apr-15 10:49
mveGerry Schmitz8-Apr-15 10:49 
AnswerRe: Reading and storing application settings in an object at startup Pin
Nathan Minier8-Apr-15 2:37
professionalNathan Minier8-Apr-15 2:37 
QuestionPerformanceCounter RawValue is not changed\modified Pin
dushkin6-Apr-15 6:05
dushkin6-Apr-15 6:05 
QuestionTextbox for numbers C# Pin
Member 114516056-Apr-15 5:06
Member 114516056-Apr-15 5:06 
AnswerRe: Textbox for numbers C# Pin
PIEBALDconsult6-Apr-15 5:09
mvePIEBALDconsult6-Apr-15 5:09 
GeneralRe: Textbox for numbers C# Pin
Member 1145160512-Apr-15 9:23
Member 1145160512-Apr-15 9:23 
AnswerRe: Textbox for numbers C# Pin
Ravi Bhavnani6-Apr-15 6:05
professionalRavi Bhavnani6-Apr-15 6:05 
QuestionQuery error: no such column Pin
DPaul19946-Apr-15 4:17
DPaul19946-Apr-15 4:17 

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.