I wonder if with Generic Constraint (when) it is possible to allow this code ?
And what is the right pattern to do this?
public MyClass<T>
{
public void MyMethod(T a, T b)
{
//some code
var result = a<b;
//some code
}
}
my question is for all operator in general
+, -, !, ~, ++, --, *, /, %, &, |, ^, <<, >>, ==, !=, <, >, <=, >=