title: Is it possible to use variable name and boolean value in method parameters?
body: <p>I have a few methods that have similar structure to each other. The only difference is the variable that is begin tested and which boolean condition is required. </p>
  
  <pre><code>public void OP_BCS(sbyte b)
  {
      cv.PC += 2;
  
      if (cv._C == true)
      {
          cv.PC += (ushort)b;
      }
  }
  </code></pre>
  
  <p>Is it possible to change the above code to something similar to what I have below (syntax might be incorrect, but should work in explaining what I mean)</p>
  
  <pre><code>public void OP_Branch(variable name, boolean condition, sbyte b)
  {
      cv.PC += 2;
  
      if (variable == condition)
      {
          cv.PC += (ushort)b;
      }
  }
  </code></pre>
  
  <p>I'd be able to make all the different combinations I need simply by giving the method a few extra parameters.</p>