SetProperty on non-primitive data types

SetProperty on non-primitive data types

Old forum URL: forums.lhotka.net/forums/t/11846.aspx


flying_monkey posted on Tuesday, February 19, 2013

I have a property of a business object where the type is a read-only business object I have created. In the read-only object I have overriden the Equals to check for value equality. In the setter of this property I am calling SetProperty(ROProp, value) but it does't seem to use the Equals method and if I set the property  with an instance that has the same values my object will still become dirty.

When I look at the code for BusinessBase it seems to be using the Equals method so I assume I can override Equals in my read-only BO to check for value equality but for whatever reason it isn't calling my overriden Equals method.

Is there something I'm missing? Should I be checking for equality manually in the setter before calling SetProperty?

Thanks for the help,

Dan

Copyright (c) Marimer LLC