The offset is going to zero, can someone tell me why and help me resolve this issue. I get a DivideByZeroException exception during the loop because the offset goes to zero
for (int offset = 0; offset <= File.Length; offset += buffersize)
{
I get a DivideByZeroException exception during the loop.
totalspeed = Math.Round((offset / (sw.ElapsedMilliseconds / 1000)) * 0.00000762939453125, 1);
}

Chetan RanpariyaRank #1,852 · 801 reputationPosted Nov 13, 2017, 9:31 PM EST
David SmithRank #999 · 2K reputationPosted Nov 13, 2017, 9:32 PM EST
Chetan RanpariyaRank #1,852 · 801 reputationPosted Nov 13, 2017, 9:38 PM EST