Click or drag to resize

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.
Inheritance Hierarchy
SystemObject
  DHI.Mike1D.GenericCompareObjects

Namespace:  DHI.Mike1D.Generic
Assembly:  DHI.Mike1D.Generic (in DHI.Mike1D.Generic.dll) Version: 19.0.0.0 (11.1.1.1111)
Syntax
public class CompareObjects

The CompareObjects type exposes the following members.

Constructors
  NameDescription
Public methodCompareObjects
Initializes a new instance of the CompareObjects class
Top
Properties
  NameDescription
Public propertyCompareChildren
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.
Public propertyCompareFields
If true, compare fields of a class (see also CompareProperties). The default is true.
Public propertyComparePrivateFields
If true, private fields will be compared. The default is false.
Public propertyComparePrivateProperties
If true, private properties will be compared. The default is false.
Public propertyCompareProperties
If true, compare properties of a class (see also CompareFields). The default is true.
Public propertyCompareReadOnly
If true, compare read only properties (only the getter is implemented). The default is true.
Public propertyDifferences
The differences found during the compare
Public propertyDifferencesString
The differences found in a string suitable for a textbox
Public propertyElementsToIgnore
Ignore classes, properties, or fields by name during the comparison. Case sensitive.
Public propertyMaxCrump
Longest crump string
Public propertyMaxDifferences
The maximum number of differences to detect
Public propertyTypesToIgnore
Ignore classes, properties, or fields by name during the comparison. Case sensitive.
Top
Methods
  NameDescription
Public methodCompare
Compare two objects of the same type to each other.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also