コード例 #1
0
 private static int BlocksNeeded(VirtualDrive drive, int numBytes)
 {
     return(Math.Max(1, (int)Math.Ceiling((double)numBytes / drive.BytesPerDataSector)));
 }
コード例 #2
0
 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)));
 }