title: C# Refactoring methods with same code except different function calls
body: <p>The varying functions have different parameters and need to return values.</p>
  
  <p>Example:</p>
  
  <pre><code>public T Foo(a, b, c, func_pointer)
  {
     //common code 
     if(no errors)
     {
        return func_pointer(a, b, c)
     }
     //common code 
  }
  
  public T Foo(a, b, c, **d**, func_pointer)
  {
     //common code 
     if(no errors)
     {
        return func_pointer(a, b, c, **d**)
     }
     //common code 
  }
  </code></pre>
  
  <p>Is there anyway to avoid code duplication?</p>