On 2012-06-25 23:26, Manu wrote:

And that's basically the limitation I'd like to overcome. The fact
something needs to be designed for it in advance; that is completely
unrealistic.
No 3rd party can ever anticipate what you might want to do. Whether you
want to unintrusively extend some existing code, or you provide a
library which can extend things in a general way.. If you can craft your
partial extension in such a way than it integrates neatly with the 3rd
party stuff you're using, that seems like a much more sensible approach,
since it leaves the customisation to you, rather than the original
author to attempt to anticipate...

I really hate it when I have to butcher 3rd party code to add my bits.
It makes it hard to maintain, if the author updates the code. Much nicer
to extend it with my bit as a partial, and keep my code clinically
separated.

Isn't it the same with partial classes? What if the third party class hasn't been marked with "partial".

--
/Jacob Carlborg

Reply via email to