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);
}