c# - How to keep DRY when I need to overload a method for all of my forms? -
on of c# forms, have following code:
protected override createparams createparams { { const int ws_ex_toolwindow = 0x80; createparams cp = base.createparams; cp.exstyle |= ws_ex_toolwindow; return cp; } }
how remove each of forms , keep code clean?
what base class inherits form
, overrides whole createparams
property. then, rest of concrete forms inherits customform
.
any form within application share createparams
implementation and, if of them requires specific implementation, override in concrete class enough! ;)
Comments
Post a Comment