private void AddShapeCharges(Order order, int formatWidth) { foreach (Shape shape in Enum.GetValues(typeof(Shape))) { _stringBuilder.AppendFormat($"{{0, {-formatWidth}}}", shape + "s"); var quantity = order.Blocks.Count(b => b.Shape == shape); var price = ShapeExtensions.GetPrice(shape); var subtotal = quantity * price; _stringBuilder.AppendLine($"{quantity} @ ${price} each = ${subtotal}"); } }