Equality check will be done before setting the field and firing the event.
public string Property1 { get { return property1; } set { if (!String.Equals(property1, value)) { OnPropertyChanging("Property1"); property1 = value; } } }
The method used for equality checking is based on the property Type. The evaluation is done in the following order.
Nullable<T>
Nullable.Equals<T>(T?,T?)
Equals
Object.Equals(object, object)
If you don't want to perform equality checking for a give property then add a [DoNotCheckEquality].
[DoNotCheckEquality]
There was an error while loading. Please reload this page.