Specified cast is not valid.. how to resolve this
<p>I have the below function</p>

<pre><code>public object Convert(object value)
 {
    string retVal = string.Empty;
    int oneMillion = 1000000;
    retVal = ((double)value / oneMillion).ToString("###,###,###.###");
    return retVal;
 }
</code></pre>

<p>I am invoking like</p>

<pre><code>var result  = Convert(107284403940);
</code></pre>

<p>Error: <strong>"Specified cast is not valid."</strong></p>

<p>how to fix...</p>

<p>Note:~ the object value can be double, decimal, float, integer(32 and 64)..anything</p>

<p>Is it possible to do the typecasting at runtime?</p>
