title: Centering text in C# console app only working with some input
body: <p>I am having a problem with centering text in a C#.NET4 console app.</p>
  
  <p>This is my method for centering the text:</p>
  
  <pre><code>private static void centerText(String text)
  {
      int winWidth = (Console.WindowWidth / 2);
      Console.WriteLine(String.Format("{0,"+winWidth+"}", text));
  }
  </code></pre>
  
  <p>However, I just get the output as it would have been outputted normally.
  If I however use this line:   </p>
  
  <pre><code>Console.WriteLine(String.Format("{0,"+winWidth+"}", "text"));
  </code></pre>
  
  <p>The "text" gets centered as it should.</p>
  
  <p>I am calling <code>centerText</code> with these two methods:</p>
  
  <pre><code>private static void drawStars()
  {
      centerText("*********************************************");
  }
  private static void title(string location)
  {
      drawStars();
      centerText("+++ Du er nu her: " + location + "! +++");
      drawStars();
  }
  </code></pre>