CompareObjects Class

Class that allows comparison of two objects of the same type to each other. Supports classes, lists, arrays, dictionaries, child comparison and more.

Definition

Namespace: DHI.Mike1D.Generic
Assembly: DHI.Mike1D.Generic (in DHI.Mike1D.Generic.dll) Version: 24.0.0.0 (11.1.1.1111)
C#
public class CompareObjects
Inheritance
Object    CompareObjects

Constructors

CompareObjectsInitializes a new instance of the CompareObjects class

Properties

CompareChildren If true, child objects will be compared. The default is true. If false, and a list or array is compared list items will be compared but not their children.
CompareFields If true, compare fields of a class (see also CompareProperties). The default is true.
ComparePrivateFields If true, private fields will be compared. The default is false.
ComparePrivateProperties If true, private properties will be compared. The default is false.
CompareProperties If true, compare properties of a class (see also CompareFields). The default is true.
CompareReadOnly If true, compare read only properties (only the getter is implemented). The default is true.
Differences The differences found during the compare
DifferencesString The differences found in a string suitable for a textbox
ElementsToIgnore Ignore classes, properties, or fields by name during the comparison. Case sensitive.
MaxCrump Longest crump string
MaxDifferences The maximum number of differences to detect
TypesToIgnore Ignore classes, properties, or fields by name during the comparison. Case sensitive.

Methods

Compare Compare two objects of the same type to each other.
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
ToStringReturns a string that represents the current object.
(Inherited from Object)

See Also