title: How to convert a function call into a MethodCallExpression
body: <p>I'm trying to facilitate the use of my library for my users.</p>
  
  <p>I have an Interface I, and a class A ...</p>
  
  <pre><code>public interface I
  {
      int f(int i);
  }
  
  public class A : I
  {
     public int f(int i)
     {
        return i * i;
     }
  }
  </code></pre>
  
  <p>I'm trying to write a function Call that take a call to f and makes operations.</p>
  
  <pre><code>static void Main(string[] args)
  {
      I obj = new A();
  
      Call(obj.f(3));
  }
  </code></pre>
  
  <p>But I don't know how to get the function into the "Call" function. My aim is that call is generic and will work with all types !
  So I try with <code>MethodCallExpression</code> but I don't really know how to convert obj.f(3) into a <code>MethodCallExpression</code> ....</p>
  
  <pre><code>public void Call(MethodCallExpression expr)
  {
  
  }
  </code></pre>
  
  <p>Thank you very much for any help :)</p>