Appearance
DeepEquals Method
Definition
- Namespace:
JASE - Assembly:
JASE.ReflectionTools.dll
bool DeepEquals(object objA, object objB, DeepEqualOptions options = null)
csharp
bool DeepEquals(object objA, object objB, DeepEqualOptions options = null)Performs a recursive equality comparison of two objects.
Parameters
| Name | Description |
|---|---|
objA | First object to compare. |
objB | Second object to compare. |
options | Optional comparison options. If null, a new DeepEqualOptions is used. |
Returns
True if the objects are considered equal by this algorithm; otherwise false.
Remarks
Comparison behavior: Reference-equal instances are equal.If either value is null, they are unequal.Primitive types and strings use System.Object.Equals(System.Object). If both values implement IEnumerable, elements are compared in order. When Key is provided, both enumerables are ordered by that property value before comparison.
For other objects, public properties and fields are compared by name and value recursively.
If CompareToString is true, ToString values are compared as a fallback.