Thursday, 26 September 2013

compare two classes c#

compare two classes c#

I need to determine if two classes have the same value.
Class A is the model of a record in a database. The value of Class A is
set as values of textboxes in a form.
If save is triggered, I need to know if values on the textboxes are still
the same as Class A.
I created Class B and equals it to class A. Then replace Class B attribute
values to what the textboxes has.
Then I compare if Class A == Class B.
My Problem is that after I update an attribute of Class B, the same
attribute from Class A updates.
what can you suggest.

No comments:

Post a Comment