vb.net - Is it possible for modules to share code -
i looking @ module performs task
- i looking @ module (module b) performs task
- tasks & b intents , purposes similar 1 small difference.
if classes inclined re-factor them such common code ended in base class inherited modules , b (which of course classes because cant inherit in module).
however keeping modules & b modules happens preferable in particular instance there clean way have third module performs same role base class or 1 have accept in instance there have element of code duplication.
i'm thinking along lines of friend declaration third module common methods declared friends within that, wondering if i've overlooked obvious.
no, haven't overlooked obvious, don't think. should try follow the dry principal (do not repeat yourself); in case, refactor common code exists once in separate module, , code different between 2 original modules left in two.
Comments
Post a Comment