title: Code snippet: create an "alias" for something else
body: <p>I was looking for a similar way to create an alias for something else like its possible in C using preprocessor (<a href="https://stackoverflow.com/questions/709463/c-sharp-macro-definitions-in-preprocessor">this</a> question is a bit similar, couldn't find anything useful there).</p>
  
  <p>This is the problem: I've got a method that receives an array, but each position of the array has a specific meaning, like they where different parameters with specific names. What I want to do is to make my code easier to read (and write) by using those specific names, but, on the other hand, I don't want to create another method call (like in example 1) nor assign the array positions to new variables (example 2), because the performance is critical.</p>
  
  <p>Example 1:</p>
  
  <pre><code>    void OriginalMethodSignature(Type[] values)
      {
          SimplifiedMethod(values[0], values[1], ... values[n]);
      }
  
      void SimplifiedMethod(Type specificName1, Type specificName2, ... Type specificNameN)
      {
          // simple implementation using specific names instead of values[n]
      }
  </code></pre>
  
  <p>Example 2:</p>
  
  <pre><code>    void OriginalMethodSignature(Type[] values)
      {
          Type specificName1 = values[0];
          Type specificName2 = values[1];
          ...
          Type specificNameN = values[n];
          // simple implementation using specific names instead of values[n]
      }
  </code></pre>
  
  <p>I cannot change the method signature because its used in a dellegate, the <code>Type</code> is fixed.</p>
  
  <p>The next example is a bit better, but still not optimum:</p>
  
  <pre><code>    void OriginalMethodSignature(Type[] values)
      {
          // implementation using values[specificName1] ... values [specificNameN]
      }
      const int specificName1 = 0;
      const int specificName2 = 1;
      ...
      const int specificNameN = n-1;
  </code></pre>
  
  <p>Is there any way to create an snippet for this purpose? If yes, how would it be?</p>