Skip to content

Latest commit

 

History

History
46 lines (29 loc) · 2.22 KB

File metadata and controls

46 lines (29 loc) · 2.22 KB

ExpressionEvaluator.ValuesAreEquivalent Method

Index > ExpressionPowerTools.Core > ExpressionPowerTools.Core.Comparisons > ExpressionEvaluator > ValuesAreEquivalent

Attempts to compare values in various ways.

Overloads

Overload Description
ValuesAreEquivalent(Object source, Object target) Attempts to compare values in various ways.

ValuesAreEquivalent(Object source, Object target)

Attempts to compare values in various ways.

public virtual Boolean ValuesAreEquivalent(Object source, Object target)

Return Type

Boolean - A flag indicating equivalency.

Parameters

Parameter Type Description
source Object The source value.
target Object The target value.

Remarks

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