Class that allows comparison of two objects of the same type to each other. Supports classes, lists, arrays, dictionaries, child comparison and more.
Object Model
Syntax
Visual Basic (Declaration) | |
---|
Public Class CompareLogic
Implements ICompareLogic |
Managed Extensions for C++ | |
---|
public __gc class CompareLogic : public ICompareLogic |
Example
CompareLogic compareLogic = new CompareLogic();
Person person1 = new Person();
person1.DateCreated = DateTime.Now;
person1.Name = "Greg";
Person person2 = new Person();
person2.Name = "John";
person2.DateCreated = person1.DateCreated;
ComparisonResult result = compareLogic.Compare(person1, person2);
if (!result.AreEqual)
Console.WriteLine(result.DifferencesString);
Inheritance Hierarchy
System.Object
KellermanSoftware.CompareNetObjects.CompareLogic
Requirements
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
See Also