title: Passing an operator along with other parameters
body: <p>I have some VERY inefficient code in which many lines appear 4 times as I go through permutations with "&lt;" and ">" operations and a variety of variables and constants.  It would seem that there is a way to write the function once and pass in the operators along with the necessarily changing values and"ref" variables.  What technique do I have to learn?  "Delegates" have been suggested but I don't see how to use them in this manner.  This is in C# 2.0, VS2005, but if the technique is generic and can be used with C++ too, that would be great.</p>
  
  <p>Request for some code:  The following appears in many guises, with different "&lt;" and ">" signs as well as a mix of "+" and "-" signs:</p>
  
  <pre><code>if (move[check].Ypos - move[check].height / 200.0D &lt; LayoutManager.VISIO_HEIGHT - lcac_c.top)
  {
    move[check].Ypos = move[check].Ypos + adjust;
  .
  .
  .
  </code></pre>