Unable to ChangeType from string to int?
<p>In the depths of our application there is an attempt to perform a conversion from a string to a nullable int with a <code>Convert.ChangeType(value, castType)</code>.  In this case the values are as follows:</p>

<pre><code>value: "00010"
castType: Nullable&lt;System.Int16&gt;
</code></pre>

<p>The issue is that I am receiving the following error </p>

<pre><code>Invalid cast from 'System.String' to 'System.Nullable`1[[System.Int16}
</code></pre>

<p>I had (obviously incorrectly) believed this was similar to a cast or Convert.ToInt16() but I've verified it's not the same by testing the following two lines of code.</p>

<pre><code>Int16 t = Convert.ToInt16("00010");
object w = Convert.ChangeType("00010", typeof(short?));
</code></pre>

<p>As you might suspect, the first succeeds whereas the second fails with the error message above.</p>

<p>Is it possible to use ChangeType in this fashion by making an adjustment or should I look at a refactor?</p>