Skip to content
Discussion options

You must be logged in to vote

the pattern this is looking for is something like:

interface I<X> where X : I<X>
{
     public virtual static operator ==(X x, ...)
}

here, one of the parameters of the equality operator is a type parameter on I, (specifically X) and that type parameter itself is constrained to I<X>.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Orange23333
Comment options

Answer selected by Orange23333
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants