Conceptual question: Consistent way of handling new fields/properties of a class

I am looking for some kind of an aproach or design patter that would allow me to handle the following situation:

I have a class (structure) with some set of fields/properties that serves only for data transfer/storage needs without any logic encapsulated. I have some separate static helper functions that process the class in the way when EACH field/property must be handled (for example duplication function).

Now when everything is done and working right I have to add some new fileds/properties to the existing class. That is not a big deal but I have to remember all the helper functions and not to forget to add the functionality for processing these additonal fields/properties. Problem is that the compiler would not tell me anything about those new members that have been forgetten to be handled. In contrast to removing a member when each missing filed/property forces to change all the depended functions.

Is there any way to get to know at the design time that some additional members have not been handled


Answer this question

Conceptual question: Consistent way of handling new fields/properties of a class

  • Conceptual question: Consistent way of handling new fields/properties of a class