Prev: Problem with BinaryFormatter Deserialize method
Next: how best to save dataset to a database file
From: Rich P on 23 Sep 2009 23:12 >>Instead, try "(int)(fileBytesRead / (fileSize / 100));" I did try an int cast, but for some reason it wasn't working. So I went with convert.Int32. But then, I didn't do my calculation quite like yours. I tried (int)((fileBytesRead / fileSize) * 100); which - mathematically should be the same as your suggestion. I will try your implementation. It looks more efficient than convert.ToInt32. Thanks. Rich *** Sent via Developersdex http://www.developersdex.com ***
First
|
Prev
|
Pages: 1 2 Prev: Problem with BinaryFormatter Deserialize method Next: how best to save dataset to a database file |