I’m using an external library which returns an object array for the old state and current state of an object (where each item in the array represents the properties and their values). So far i have come up with:
for (var i = 0; i < oldState.Length; i++) {
return oldState[i].Equals(state[i]);
}
This compares all the top level properties. But i also wish to drill into some (ones marked with the attribute CompareComplex) of the complex properties and compare for differences between it’s properties them aswell. I’d imagine the best way to achieve this would be to use a recursive function. I can’t quite get my head around this but i’m sure the solution is quite simple.
I’d really appreciate it if someone could help. Thanks
cheers for your answers i have managed to come up the the following method:
A few things to note:
If anyone has any suggestions on how i can improve this then i’d really appreciate it. Thanks