private static int BlocksNeeded(VirtualDrive drive, int numBytes) { return(Math.Max(1, (int)Math.Ceiling((double)numBytes / drive.BytesPerDataSector))); }
private static int BlocksNeeded(VirtualDrive drive, int numBytes) { //returns number of blocks needed for numbytes give bytes per data sector return(Math.Max(1, (int)Math.Ceiling((double)numBytes / drive.BytesPerDataSector))); }