title: T4 reference a const in a static class at compile time
body: <p>I have a T4 C# file in which I need to reference a constant in a static class. The static class is in the same namespace.</p>
  
  <p>Is this possible?</p>
  
  <p>The below is merely an illustration. I need to calculate the actual constant based on existing constants, but there is also a call to an extension method involved. To keep it simple, I am merely illustrating the concept.</p>
  
  <p>.cs file:</p>
  
  <pre><code>namespace me
  {
    public static class Stat
    {
      public const int Const = 1;
    }
  }
  </code></pre>
  
  <p>. tt file:</p>
  
  <pre><code>...
  namespace me
  {
    public static int Test
    {
      return &lt;#= Stat.Const #&gt;;
    }
  }
  </code></pre>