ValeraT1982 / ObjectsComparer

C# Framework provides mechanism to compare complex objects, allows to override comparison rules for specific properties and types.
MIT License
354 stars 87 forks source link

The comparison of null values to String.empty is not explicit #39

Closed HZ-GeLiang closed 2 years ago

HZ-GeLiang commented 2 years ago

I have two objects

image

I can't tell the difference between value1 and value 2 from the prompt because one value is null and the other is stirm.empty

image

image

ValeraT1982 commented 2 years ago

Yes. Null is represented as empty string. How would you expect to represent 'nothing' as a string?

HZ-GeLiang commented 2 years ago

I looked at the source code and found that Difference overrides the stirng method. If I wanted to customize the prompt message, I would not get Null value while iterating over differences