A
Art
- I populate [deserialize] order class from a file (order.xml)- works OK,
- Serialize back to a file - works OK,
Now ...
- I populate another instance of order class with data from DB,
- at this time both classes, deserialized and populated form DB, are identical
- when I serialize DB version one field always gets omitted
So, deserialized version:
Order.Commission = -5.23; // Commision is of type decimal
Serializes to:
<Order><Commission>5.25</Commission></Order>
But DB loaded version:
Order.Commission = -5.23; // Commision is of type decimal
Serializes to:
<Order></Order>
Both use the same Serialize function. What can be wrong?
BTW, when I rename Commission to, say, Commission2 it works. WTF..
Thaks for help!
- Serialize back to a file - works OK,
Now ...
- I populate another instance of order class with data from DB,
- at this time both classes, deserialized and populated form DB, are identical
- when I serialize DB version one field always gets omitted
So, deserialized version:
Order.Commission = -5.23; // Commision is of type decimal
Serializes to:
<Order><Commission>5.25</Commission></Order>
But DB loaded version:
Order.Commission = -5.23; // Commision is of type decimal
Serializes to:
<Order></Order>
Both use the same Serialize function. What can be wrong?
BTW, when I rename Commission to, say, Commission2 it works. WTF..
Thaks for help!