Skip to content

Commit 08b70b9

Browse files
fix null checking in financial
1 parent 25cc43d commit 08b70b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Algorithms/Financial/PresentValue.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public static double Calculate(double discountRate, List<double> cashFlows)
1616
throw new ArgumentException("Discount rate cannot be negative");
1717
}
1818

19-
if (cashFlows == null || cashFlows.Count == 0)
19+
if (cashFlows.Count == 0)
2020
{
2121
throw new ArgumentException("Cash flows list cannot be empty");
2222
}

0 commit comments

Comments
 (0)