How to implement == or >= operators for generic type
Posted
by momsd
on Stack Overflow
See other posts from Stack Overflow
or by momsd
Published on 2010-05-07T14:42:41Z
Indexed on
2010/05/07
14:48 UTC
Read the original article
Hit count: 253
I have a generic type Foo which has a internal generic class Boo. Boo class a property Value of type K. In a method inside Foo i want to do a boo.Value >= value
Note that second operand value is of type T. while compiling i am getting following error:
Operator '>=' cannot be applied to operands of type 'T' and 'T'
Can anyone please tell me whats the problem here?
© Stack Overflow or respective owner