private static int BlocksNeeded(VirtualDrive drive, int numBytes) { return(Math.Max(1, (int)Math.Ceiling((double)numBytes / (double)drive.BytesPerDataSector))); }