I have a class with more than 100 properties (this is a database mapping class), and one of the properties should be in the method. In other words, this data is not displayed through a property, but through methods:
"ABCType GetABC (), SetABC (value ABCType)"
All this is very different from C #. I shudder when I see this.
The class must be serializable so that it can be sent through web services, and the data obtained by Get / Set methods must also be serialized. (Due to the strange thing that I use the network is reflected in the method, it cannot process objects that contain properties of the same type as the containing object. The problem property preserves the initial state of the database object in If reverse is required. Ineffective implementation, yes, but I can't rebuild it.)
My question is this: since only this field 1 needs a special serialization code, I would like to use custom serialization only to call GetABC and SetABC, returning to the basic XML serialization for the rest of the class. This minimizes the chance of errors in my serialization code. Is there any way?
c # xml serialization
user77562
source share