Visual Studio/C#: Include/merge files -


in c# project, need add many classes each have 10 common properties, each 1 adding several specific properties. expected number of common properties grow 20.

i to:

  1. have base class / file hold common properties
  2. create many classes without inheriting base class , new classes have common properties base class/file.
  3. in "derived" classes can add new properties.
  4. in future, when list of common properties grow, edit base class/file , have them inserted automatically in "descendant" classes.

basically, need placeholder inserted somewhow in files links external file , add content classes @ compile time, #include directive works in c++.

so need inheritance without deriving classes, makes sense.

probably closet can interface properties. still need implement properties in "descendant" classes. easy write script implements them auto-properties when master file changes though.


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -