title: How to reference an unused parameter?
body: <p>Back in the days of C/C++, Microsoft had a <code>#define</code>, which allowed programmers to reference an unused parameter. The declaration, part of windef.h, is:</p>
  
  <pre><code>#define UNREFERENCED_PARAMETER(P) {(P)=(P);}
  #define UNREFERENCED_LOCAL_VARIABLE(L) {(L)=(L);}
  </code></pre>
  
  <p>Whatever the exact name and syntax, the line had the effect of</p>
  
  <ol>
  <li>Telling the compiler to not flag this unused parameter as a warning</li>
  <li>The later stages of the compiler was smart enough to not include the line in the binary (or so I recall)</li>
  <li>Visually tells the viewer that the unreferenced parameter was not an oversight.</li>
  </ol>
  
  <p>Is there a similar syntax in C#?</p>
  
  <p>Although it makes no difference for this question, but the DevExpress CodeRush Visual Studio add-in flags all unused parameters, even in event handlers, as a warning.</p>
  
  <p>NOTE:
  As I stated in my comment, I do not want to use <code>pragma</code> blocks. The purpose is to add a line of code that references the parameter for warning sake but adds none to trivial overhead, like what the windef.h header file macro did.</p>