how can we do this (use operators in common methods)
As a rule, we cannot. For most operators, if used with a type parameter (for example, T), the compiler cannot work out the applicable overload for use at compile time.
( , ), , . , System.Uri - , ==. , :
class Test<T> where T : Uri
{
internal void Method(T x, T y)
{
bool ok = x == y;
}
}
. , .
, T - (struct), == () * () << ( ) . #.
dynamic , , , .