REFACTOR: Use string interpolation expression.

This commit is contained in:
2017-12-21 17:58:51 +00:00
parent a895700757
commit 4e6e8f340a
182 changed files with 766 additions and 1256 deletions

View File

@@ -566,7 +566,7 @@ namespace DiscImageChef.DiscImages
{
if(sectorAddress > ImageInfo.Sectors - 1)
throw new ArgumentOutOfRangeException(nameof(sectorAddress),
string.Format("Sector address {0} not found", sectorAddress));
$"Sector address {sectorAddress} not found");
if((bitmap[sectorAddress / 8] & (1 << (int)(sectorAddress % 8))) == 0) return new byte[ImageInfo.SectorSize];
@@ -604,7 +604,7 @@ namespace DiscImageChef.DiscImages
{
if(sectorAddress > ImageInfo.Sectors - 1)
throw new ArgumentOutOfRangeException(nameof(sectorAddress),
string.Format("Sector address {0} not found", sectorAddress));
$"Sector address {sectorAddress} not found");
if(sectorAddress + length > ImageInfo.Sectors)
throw new ArgumentOutOfRangeException(nameof(length), "Requested more sectors than available");