Is a simple open source objects compare library
Compares members of two objects and evaluates if they are equal or none equal based on conventions (public properties with the same names and same/derived/convertible types). Provides also few tweak options
You can install it via package manager console
PM> Install-Package Statics.Compare
using static Statics.Compare.Members;
var equals = CompareEquals(left, right);
- StringComparison memberNameComparison = StringComparison.OrdinalIgnoreCase,
- bool evaluateChildNodes = false,
- bool ignoreDefaultLeftValues = false,
- bool ignoreDefaultRightValues = false,
- bool useConvert = false
Differences can be listed by using parameter memberDiffs:
var equals = CompareEquals(
leftEntries,
rightEntries,
out IEnumerable<MemberDiff> memberDiffs,
evaluateChildNodes: true);