1,115 reputation
411
bio website cysoft.ch
location Switzerland
age
visits member for 3 years, 1 month
seen Dec 14 at 16:13

Nov
27
awarded  Yearling
Sep
9
comment What is the benefit of passing a delegate to the constructor instead of just having the client code create and pass the ParserSettings?
The constructor could execute some logic modifying the configuration before calling the delegate. And in future versions of the parser the delegate could be called later in the parsing process. This makes the code fit for the future. (This is what the Open-Closed Principle is all about.)
Sep
9
comment What is the benefit of passing a delegate to the constructor instead of just having the client code create and pass the ParserSettings?
Sure, if the default configuration is always the same. But the parser could decide to use different standard configurations depending on the file type being processed or even let preprocessor macros modify it. This would give the delegate the opportunity to just check a given configuration and make changes where appropriate instead of just providing a constant set of configuration settings.
Sep
9
answered What is the benefit of passing a delegate to the constructor instead of just having the client code create and pass the ParserSettings?
Aug
22
revised C# inherit from a class in a different DLL
deleted 2 characters in body
Aug
22
revised C# inherit from a class in a different DLL
deleted 2 characters in body
Aug
22
revised C# inherit from a class in a different DLL
deleted 2 characters in body
Aug
22
revised C# inherit from a class in a different DLL
added 38 characters in body
Aug
21
revised C# inherit from a class in a different DLL
added 1250 characters in body
Aug
21
revised C# inherit from a class in a different DLL
added 1250 characters in body
Aug
21
revised C# inherit from a class in a different DLL
added 129 characters in body
Aug
21
answered C# inherit from a class in a different DLL
Mar
19
comment Why is 'void' not allowed as a generic type in C#
@supercat: Yes, therefore the need for all the Func<> as well as Action<> overloads.
Jan
22
revised Why is inheritance only defined at compile-time?
edited body
Jan
21
revised How important is to initialize a variable
added 141 characters in body
Jan
21
comment Unique and primary keys on a database (mysql)
@LucFranken: Look at the comments that follow the article. This statement seems to wrong.
Jan
21
answered Why is inheritance only defined at compile-time?
Jan
21
revised Unique and primary keys on a database (mysql)
deleted 14 characters in body
Jan
13
revised How important is to initialize a variable
added 4 characters in body
Jan
13
revised How important is to initialize a variable
added 27 characters in body