title: Is it possible to pass interpolated strings as parameter to a method?
body: <p>I have started to use <a href="https://msdn.microsoft.com/en-us/library/dn961160.aspx" rel="noreferrer">Interpolated Strings</a> (new feature of C# 6) and it is really useful and gracefully. But according to my needs I have to pass format of string to a method as a parameter. Something like next:</p>
  
  <pre><code>MyMethod(string format)
  </code></pre>
  
  <p>In the past, I used it in the next way:</p>
  
  <pre><code>MyMethod("AAA{0:00}")
  </code></pre>
  
  <p>Now I tried this code:</p>
  
  <pre><code>MyMethod($"AAA{i:00}")
  </code></pre>
  
  <p>But this doesn't work, because <code>i</code> is created inside of the method and is out of scope in this context.</p>
  
  <p>Is it possible to use any trick for passing interpolated strings as a parameter to a method?</p>