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:
- have base class / file hold common properties
- create many classes without inheriting base class , new classes have common properties base class/file.
- in "derived" classes can add new properties.
- 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
Post a Comment