Check for state change in objects using serialization?
Posted
by sev7n
on Stack Overflow
See other posts from Stack Overflow
or by sev7n
Published on 2010-03-17T22:11:54Z
Indexed on
2010/03/17
23:11 UTC
Read the original article
Hit count: 221
I have a form that is bind to an object, and when the user trying to leave the form, I want to warn them if anything on the form has been changed, and prompt them to save. My question is, is there any way to achieve this without implementing IComparar for all my classes in the binded object? I was thinking if there is a way I can serialize my object when loading the form, and do a simple comparison against the change object that also get serialized. Something like a string comparison.
Hope that make sense,
Thanks
© Stack Overflow or respective owner