title: Pass FieldName as a Parameter
body: <p>I'm not quite sure what I'm attempting to do is called, so I'm struggling to find any clues from google.</p>
  
  <p>I have a couple of methods with the same logic in them, the only thing that differs is the property they are using on an object.</p>
  
  <pre><code>class Foo
  {
     public int A(Bar bar)
     {
        return bar.A * 2;
     }
  
     public int B(Bar bar)
     {
        return bar.B * 2;
     }
  
     public int C(Bar bar)
     {
        return bar.C * 2;
     }
  }
  
  class Bar
  {
     public int A;
     public int B;
     public int C;
  }
  </code></pre>
  
  <p>Instead of the three separate methods in <code>Foo</code> I want one, with a signature that looks more like</p>
  
  <pre><code>public int X(Bar bar, ??? x)
  {
     return bar.x * 2;
  }
  </code></pre>
  
  <p>Is this possible?</p>