title: String Interpolation with format variable
body: <p>I can do this:</p>
  
  <pre><code>var log = string.Format("URL: {0}", url);
  </code></pre>
  
  <p>or even like this</p>
  
  <pre><code>var format = "URL: {0}";
  ...
  var log = string.Format(format, url);
  </code></pre>
  
  <p>I have a <code>format</code> defined somewhere else and use the <code>format</code> variable, not inline string.</p>
  
  <p>In C# 6, this is seems impossible:</p>
  
  <pre><code>var format = $"URL: {url}"; // Error url does not exist
  ...
  var url = "http://google.com";
  ...
  var log = $format; // The way to evaluate string interpolation here
  </code></pre>
  
  <p>Is there anyway to use string interpolation with variable declared earlier?</p>
  
  <p>C# 6 seems interpolate the string inline during compile time. However consider using this feature for localization, define a format in config or simply having a format <code>const</code> in a class.</p>