Click here to Skip to main content
14,427,818 members
   

C#

 
AnswerRe: Simplify usage of a complex generic class for convenience Pin
Gerry Schmitz4-Apr-19 6:10
mveGerry Schmitz4-Apr-19 6:10 
GeneralRe: Simplify usage of a complex generic class for convenience Pin
BillWoodruff5-Apr-19 22:00
mveBillWoodruff5-Apr-19 22:00 
AnswerRe: Simplify usage of a complex generic class for convenience Pin
Richard Deeming4-Apr-19 10:28
communityengineerRichard Deeming4-Apr-19 10:28 
GeneralRe: Simplify usage of a complex generic class for convenience Pin
BillWoodruff5-Apr-19 5:03
mveBillWoodruff5-Apr-19 5:03 
GeneralRe: Simplify usage of a complex generic class for convenience Pin
Richard Deeming5-Apr-19 6:34
communityengineerRichard Deeming5-Apr-19 6:34 
GeneralRe: Simplify usage of a complex generic class for convenience Pin
BillWoodruff5-Apr-19 17:37
mveBillWoodruff5-Apr-19 17:37 
GeneralRe: Simplify usage of a complex generic class for convenience Pin
Richard Deeming15-Apr-19 9:15
communityengineerRichard Deeming15-Apr-19 9:15 
GeneralRe: Simplify usage of a complex generic class for convenience Pin
BillWoodruff15-Apr-19 20:06
mveBillWoodruff15-Apr-19 20:06 
This perceptual glitch of mine was simply the whine of a small dis-oriented horse-fly orbiting the radiance of your intellect OMG | :OMG:

What interests me, much more, is whether you would agree that the attempt to "bend" the Generic canon here into a variable polymorphism ... is ... a complexity that costs more than its worth in terms of SOLID and future maintenance. That's what I said to the OP in my last post to him (albeit, in less fancy language/terms).
Quote:
imho, all of these implementations are hacks, and writing straightforward individual methods for each group of Types is better practice.

To me the attempt here to make these generic methods more "generalized" just leads to semantic confusion. It's not that much work to write a bunch of specific methods that can provide strict control over parameter validation, and can be unit tested efficiently.
If there were ever a critical (unavoidable) need for this kind of facility: my wild guess would be to implement a factory that used Emit and CodeDom to build the classes.

cheers, Bill
«Where is the Life we have lost in living? Where is the wisdom we have lost in knowledge? Where is the knowledge we have lost in information?» T. S. Elliot

GeneralRe: Simplify usage of a complex generic class for convenience Pin
Richard Deeming16-Apr-19 8:32
communityengineerRichard Deeming16-Apr-19 8:32 
AnswerRe: Simplify usage of a complex generic class for convenience Pin
BillWoodruff5-Apr-19 21:12
mveBillWoodruff5-Apr-19 21:12 
GeneralRe: Simplify usage of a complex generic class for convenience Pin
Gerry Schmitz6-Apr-19 12:03
mveGerry Schmitz6-Apr-19 12:03 
GeneralRe: Simplify usage of a complex generic class for convenience Pin
BillWoodruff6-Apr-19 12:20
mveBillWoodruff6-Apr-19 12:20 
GeneralRe: Simplify usage of a complex generic class for convenience Pin
BillWoodruff6-Apr-19 16:44
mveBillWoodruff6-Apr-19 16:44 
AnswerRe: Simplify usage of a complex generic class for convenience Pin
BillWoodruff6-Apr-19 13:57
mveBillWoodruff6-Apr-19 13:57 
QuestionWhere are the libraries located in C#? Pin
Brian_TheLion3-Apr-19 21:15
MemberBrian_TheLion3-Apr-19 21:15 
AnswerRe: Where are the libraries located in C#? Pin
OriginalGriff3-Apr-19 22:34
communityengineerOriginalGriff3-Apr-19 22:34 
GeneralRe: Where are the libraries located in C#? Pin
Brian_TheLion4-Apr-19 0:20
MemberBrian_TheLion4-Apr-19 0:20 
GeneralRe: Where are the libraries located in C#? Pin
OriginalGriff4-Apr-19 0:28
communityengineerOriginalGriff4-Apr-19 0:28 
GeneralRe: Where are the libraries located in C#? Pin
Brian_TheLion4-Apr-19 1:06
MemberBrian_TheLion4-Apr-19 1:06 
GeneralRe: Where are the libraries located in C#? Pin
OriginalGriff4-Apr-19 0:31
communityengineerOriginalGriff4-Apr-19 0:31 
GeneralRe: Where are the libraries located in C#? Pin
Brian_TheLion4-Apr-19 0:58
MemberBrian_TheLion4-Apr-19 0:58 
GeneralRe: Where are the libraries located in C#? Pin
Brian_TheLion4-Apr-19 1:02
MemberBrian_TheLion4-Apr-19 1:02 
GeneralRe: Where are the libraries located in C#? Pin
CHill604-Apr-19 1:38
mveCHill604-Apr-19 1:38 
GeneralRe: Where are the libraries located in C#? Pin
OriginalGriff4-Apr-19 1:46
communityengineerOriginalGriff4-Apr-19 1:46 
GeneralRe: Where are the libraries located in C#? Pin
CHill604-Apr-19 2:20
mveCHill604-Apr-19 2:20 

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.