I want to compare two objects without implementing the Equals() method.
What are the downsides of comparing them in this way: 1. serilizing them with Json 2. comparing the results
thanks!
What are the downsides of comparing them in this way
Loss of speed. Transforming objects into JSON strings and then comparing them is much slower than doing a property by property equals.
Implementing Equals()
is always the best way to compare two objects for equality.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With