title: How to use Generics to implement this?
body: <blockquote>
    <p>Generics are used to decouple logic from data type.</p>
  </blockquote>
  
  <pre><code>public class Calc&lt;T&gt;
  {
     public T Add(T a, T b)
     {
         return (a+b);
     }
  }
  </code></pre>
  
  <p>But this is throwing the below compile time error</p>
  
  <p><strong><em>Operator + cannot be applied on type T.</em></strong></p>
  
  <p>I am not understanding why so. because if it allows from main.cs</p>
  
  <pre><code>main()
  {
       Calc&lt;int&gt; obj = new Calc&lt;int&gt;();
       int c = obj.Add(10,20);
  }
  </code></pre>
  
  <p>Can somebody please explain why I am getting Build errors??</p>