What is IAlternateEqualityComparer? #104423
Answered
by
En3Tho
TonyValenti
asked this question in
Q&A
-
I've started seeing this interface pop up in PRs but I'm not sure why it exists or what it is used for. |
Beta Was this translation helpful? Give feedback.
Answered by
En3Tho
Jul 4, 2024
Replies: 1 comment 3 replies
-
@TonyValenti Basically an interface in addition to IEqualityComparer that says "hey, you've got some data of type X there and I can compare it with data of type Y. With it you can look up values in string based Dictionaries using spans for example. I believe this was one of the main motivations for it. |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
stephentoub
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@TonyValenti Basically an interface in addition to IEqualityComparer that says "hey, you've got some data of type X there and I can compare it with data of type Y.
With it you can look up values in string based Dictionaries using spans for example. I believe this was one of the main motivations for it.