title: FileInfo.Length is not giving me the correct file size always
body: <p>I am facing a very strange issue with <code>FileInfo</code> and the <code>Length</code> property. I am writing a server that responds to calls to send files (mainly images) to the clients. I want to send the file size to the client before I send the actual file. I am using <code>FileInfo</code> to find the file size but strangely it does not give me the correct size every time. Put differently, for the same file I receive different sizes, sometimes less than the actual size and sometimes correct (but never more than the actual size). What makes the problem even more strange, if I copy the same code to a new project (not a server, just a test project) it works fine and gives correct answers. The server use threads so multiple clients can connect (the test project doesn't) but I don't think that this has anything to do with <code>FileInfo</code>. Here is my code:</p>
  
  <pre><code>String fullFilePath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "\\" + imageName;
  FileInfo file1 = new FileInfo(fullFilePath);
  Console.Writeline("File Size: {0}", file1.Length);
  </code></pre>
  
  <p>Very basic code! My images are small in the range of 4 to 10 Kbytes only. Am I doing something wrong? Any suggestions?</p>