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

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -