Adding columns to a DataTable using SetOrdinal
<p>Let's say I have a DataTable with five columns. I am curious as to why the following works:</p>

<pre><code>dt.Columns.Add("Blah").SetOrdinal(5);
</code></pre>

<p>But the following throws an <code>ArgumentOutOfRangeException</code>:</p>

<pre><code>dt.Columns.Add("Blah").SetOrdinal(dt.Columns.Count);
</code></pre>

<p>I also tried</p>

<pre><code>dt.Columns.Add("Blah").SetOrdinal(dt.Columns.Count - 1);
</code></pre>

<p>which works, but I'm not entirely sure why. Does it have something to do with the column being added before the <code>SetOrdinal</code> is executed, thus increasing the count beyond the range of columns?</p>
