Comparing 2 objects and retrive a list of fields with different values
- by ajj
Hi
given a class with 35 fields and 2 objects with a certain number of different fields value.
is there an clever way to get a list with the fields name where the objext
Say
obj1.Name = "aaa";
obj1.LastName = "bbb";
obj1.Address = "xcs";
obj2.Name = "aaa";
obj2.LastName = "ccc";
obj2.Address = "jk";
objective:
list containing 2 strings LastName and Address
I see reflection as the way to go but with 35 fields I am afraid it s to heavy.
Any other idea, like linq?
Thanks,
a.