Skip to content

Implement IEqualityComparer<Expression?> and GetHashCode #5

@SpaceOgre

Description

@SpaceOgre

Hi,

I know this library is pretty old but I stumbled upon it when looking for a way to compare Expressions from diffrent Classes but with the same value.

I have a need for GetHashCode when doing this and wonder if you think it would be hard to implement it for this comparer? It would be great to be able to use it with HashSet, Distinct etc

I have looked at the Microsofts ExpressionEqualityComparer and tweak their version with your TryCalculateConstant and it seems to work but I have only tested it with a small number of expressions. If you are intrestead I could look into adding theirs GetHashCode for this library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions