Index > ExpressionPowerTools.Core > ExpressionPowerTools.Core.Comparisons > ExpressionEvaluator > ValuesAreEquivalent
Attempts to compare values in various ways.
| Overload | Description |
|---|---|
| ValuesAreEquivalent(Object source, Object target) | Attempts to compare values in various ways. |
Attempts to compare values in various ways.
public virtual Boolean ValuesAreEquivalent(Object source, Object target)Boolean - A flag indicating equivalency.
| Parameter | Type | Description |
|---|---|---|
source |
Object | The source value. |
target |
Object | The target value. |
If one side is null and other is not null , returns false . If the objects are the same reference,
returns true . If the type implements IEquatable<T> then the result of System.IEquatable<T1>.Equals is returned. If the type implements IComparable then the result is true if System.IComparable.CompareTo is 0 . Otherwise, the result of System.Object.Equals from
the source to the target is returned.
Exceptions are compared by the Message property. The comparison is also recursive: if a type is found that has an
existing comparison method, the method is called for further validation.
| Generated | Copyright | Version |
|---|---|---|
| 02/22/2021 21:59:57 | (c) Copyright 2020 Jeremy Likness. | 0.9.7-beta |