c# - Overwrite built in .NET class -
if inherit class such system.windows.forms.control , create system.windows.forms.newcontrol, there way of forcing .net use system.windows.forms.newcontrol class system.windows.forms.control built in controlls use system.windows.forms.newcontrol?
ie. make base changes how controls work, , changes reflected in controls without having subclass every single control type.
i know extension methods not work need called explicitly, , looking alter properties methods.
no, cannot this. idea behind oo people write code adhering contract , behavior of existing class can trust class continue behave how it's designed without worry user interference. isn't dynamic language ruby.
Comments
Post a Comment