CanSetFieldValue<T> method
Implementation
bool CanSetFieldValue<T>(T field, T value) {
bool applyChange;
if (field == null) {
applyChange = value != null;
} else {
if (field is Comparable<T>) {
Comparable<T> c = field;
applyChange = value != null && c.compareTo(value) != 0;
} else {
applyChange = true;
}
}
return applyChange;
}