Fixed Utilization within Bin.ToString

This commit is contained in:
AJ
2020-07-30 09:41:35 -04:00
parent ba07040318
commit b945672d92

View File

@@ -38,12 +38,11 @@ namespace CutToLength
public override string ToString() public override string ToString()
{ {
return string.Format( var totalLength = Math.Round(Length, 4);
"Length: {0}\", {1}\" remaining, {2} items, {3}% utilization", var remainingLength = Math.Round(RemainingLength, 4);
Math.Round(Length, 4), var utilitation = Math.Round(Utilization * 100, 2);
Math.Round(RemainingLength, 4),
Items.Count, return $"Length: {totalLength}\", {remainingLength}\" remaining, {Items.Count} items, {utilitation}% utilization";
Math.Round(Utilization, 2));
} }
} }
} }