CodePlexProject Hosting for Open Source Software
Important
C# Example
//This is the comparison class CompareObjects compareObjects = new CompareObjects(); //Create a couple objects to compare Person person1 = new Person(); person1.DateCreated = DateTime.Now; person1.Name = "Greg"; Person person2 = new Person(); person2.Name = "John"; person2.DateCreated = person1.DateCreated; //These will be different, write out the differences if (!compareObjects.Compare(person1, person2)) Console.WriteLine(compareObjects.DifferencesString);
VB.NET Example
'This is the comparison class Dim compareObjects As New CompareObjects() 'Create a couple objects to compare Dim person1 As New Person()person1.DateCreated = Date.Now person1.Name = "Greg" Dim person2 As New Person() person2.Name = "John" person2.DateCreated = person1.DateCreated 'These will be different, write out the differences If Not compareObjects.Compare(person1, person2) Then Console.WriteLine(compareObjects.DifferencesString) End If
Last edited Dec 20, 2012 at 3:14 PM by gfinzer, version 3