Compare

De Banane Atomic
Aller à la navigationAller à la recherche

Compare-Net-Objects

Cs.svg
var config = new ComparisonConfig();
config.IgnoreProperty<MyClass>(x => x.Id);

var compareLogic = new CompareLogic(config);

ComparisonResult result = compareLogic.Compare(object1, object2);

if (!result.AreEqual)
{
    Console.WriteLine(result.DifferencesString);
}