Writeline throwing "Input string was not in a correct format"
<p>I am trying to write a number of values onto a line, like this...</p>

<pre><code>try
{
    sw.WriteLine("Element               {0}     {1}     {2}     {3}     {4}     {5}     {6}     (7}     {8}",
                 "a",
                 "b",
                 "c",
                 "d",
                 "e",
                 "f",
                 "g",
                 "h",
                 "i");
}
catch (Exception ex)
{
    string mystring = ex.ToString();
}
</code></pre>

<p>and getting an "Input string was not in a correct format" exception for my trouble. The streamwriter object exists and is valid as numerous other writes are performed before this one. (In the fullness of time I will replace the "a" etc with something more useful; as soon as I get this problem sorted out.)</p>

<p>Can anyone see what is wrong?</p>
