title: C# interface to check type T has an operator / A way to check if type T has an operator
body: <pre><code>interface IMathable
  {
      public static IMathable operator +(IMathable l, IMathable r);
      public static IMathable operator -(IMathable l, IMathable r);
  }
  </code></pre>
  
  <p>Is such possible? I have range of mathmatical class. Vector2/3/4/5/6 Matrix3x3/4x4/5x5/6x6 and so on.</p>
  
  <p>They don't have a common class that they drive from. But they all have operators such as + - * /</p>
  
  <p>I want to have a class like.</p>
  
  <pre><code>class MyClass &lt;T&gt; where T : IMathable
  {
      T magnitude_required_to_reach_toHere;
  
      public MyClass (IMathable from, IMathable toHere)
          {
              magnitude_required_to_reach_toHere = from + toHere;
          }
  }
  </code></pre>
  
  <p>Is there a way to achieve this? I was advised to have all my math classes to drive from abstract class but I can't have abstract class for all these mathmatical classes since they are built in, part of library; I can't fix the code.</p>