title: Can I use the keyword "in" to separate parameters in a method declaration somehow?
body: <p>I would like to create a method that uses the keyword <code>in</code> instead of a comma to separate parameters in a method declaration; something similar to the <code>foreach(a in b)</code> method.</p>
  
  <p><strong>Example</strong></p>
  
  <p><em>Class Structure</em></p>
  
  <pre><code>public class Length
  {
      public double Inches;
      public double Feet;
      public double Yards;
  
      public enum Unit { Inch, Foot, Yard }
  
      Dictionary&lt;Unit, double&gt; inchFactor = new Dictionary&lt;Unit, double&gt;()
      {
          { Unit.Inch, 1 },
          { Unit.Foot, 12 },
          { Unit.Yard, 36 }
      };
  
      public Length(double value, Unit unit)
      {
          this.Inches = value * inchFactor[unit];
          this.Feet = this.Inches / inchFactor[Unit.Foot];
          this.Yards = this.Inches / inchFactor[Unit.Yard];
      }
  }
  </code></pre>
  
  <p><em>Method Definition in Class</em></p>
  
  <pre><code>// I'd like to know how to use "in" like this  ↓
  public List&lt;Length&gt; MultiplesOf(Length divisor in Length dividend)
  {
      double inchEnumeration = divisor.Inches;
      List&lt;Length&gt; multiples = new List&lt;Length&gt;();
  
      while (inchEnumeration &lt;= dividend.Inches)
      {
          multiples.Add(new Length(inchEnumeration, Length.Unit.Inch));
          inchEnumeration += divisor.Inches;
      }
  
      return multiples;
  }
  </code></pre>
  
  <p><em>Ideal Implementation</em></p>
  
  <pre><code>private void DrawRuler()
  {
      Length eighthInch = new Length(0.125, Length.Unit.Inch);
      Length oneFoot = new Length(1, Length.Unit.Foot);
  
      // Awesome.
      List&lt;Length&gt; tickGroup = Length.MultiplesOf(eighthInch in oneFoot);
  
      double inchPixels = 10;
      foreach (Length tick in tickGroup)
      {
          // Draw ruler.
      }
  }
  </code></pre>
  
  <hr />
  
  <p>I've looked into creating new keywords, but it looks like C# does not support defining keywords.</p>