D
Doug
Not that I'd actually do this... but knowing the answer would give me a bit
more understanding of the .NET Framework and the base class libraries -
specifically how things work in relation to my own custom classes or
libraries.
We could use any of the framework's classes - but lets take, for example,
the ListDictionary (System.Collections.Specialized.ListDictionary).
When solving some programming problem, I could (1) use the ListDictionary
"as is", or (2) build and consume the equivalent functionality by creating
my own class that wraps up an array or some other data structure, then add
to that class equivalent searching algorithms, etc. to the point where I
have effectively completely duplicated all the functionality that exists in
the .NET Framework's ListDictionary. When I am done I have *exactly*
duplicated the functionality; nothing more and nothing less than what
comprises the ListDictionary. Furthermore I have used the exact same
algorithms etc that Microsoft implements in the ListDictionary. You get the
idea - mine is the exact same thing in every way with the single exception
that all the code exists in my own namespace and class and ultimately in my
own assembly.
Questions:
1. Would there be *any* runtime performance penalty (imperceptible as it may
be) in an application making use of my custom class vs the Frameworks? If
so, what specifically would cause that penalty? If no penalty, then why no
penalty?
2. Would there be any benefit at all to doing this? (and yes I understand
that whatever benefit there might be would likely be totally outweighed by
the development costs etc associated with reinventing functionality that is
already in the Framework).
Thank You!
more understanding of the .NET Framework and the base class libraries -
specifically how things work in relation to my own custom classes or
libraries.
We could use any of the framework's classes - but lets take, for example,
the ListDictionary (System.Collections.Specialized.ListDictionary).
When solving some programming problem, I could (1) use the ListDictionary
"as is", or (2) build and consume the equivalent functionality by creating
my own class that wraps up an array or some other data structure, then add
to that class equivalent searching algorithms, etc. to the point where I
have effectively completely duplicated all the functionality that exists in
the .NET Framework's ListDictionary. When I am done I have *exactly*
duplicated the functionality; nothing more and nothing less than what
comprises the ListDictionary. Furthermore I have used the exact same
algorithms etc that Microsoft implements in the ListDictionary. You get the
idea - mine is the exact same thing in every way with the single exception
that all the code exists in my own namespace and class and ultimately in my
own assembly.
Questions:
1. Would there be *any* runtime performance penalty (imperceptible as it may
be) in an application making use of my custom class vs the Frameworks? If
so, what specifically would cause that penalty? If no penalty, then why no
penalty?
2. Would there be any benefit at all to doing this? (and yes I understand
that whatever benefit there might be would likely be totally outweighed by
the development costs etc associated with reinventing functionality that is
already in the Framework).
Thank You!