Getting file size in KB
<p>i am storing file in database in KB. I try to convert file length return by file info to KB as follow.</p>

<pre><code>FileInfo FileVol = new FileInfo(DownloadPath);
int SizeinKB = (int)(FileVol).Length / 1024 ;
</code></pre>

<p>If the file size return from  DB and the value in Size in KB is equal then only my code allow to install the software from DownloadPath. But i always getting value in Size in KB less than that of value return from DB (always 1 KB). What is wrong with me.</p>

<p>Please help to resolve.</p>