Practice · 2 of 4
Money as a record
CHALLENGE
Difficulty: beginner+25 XP
Implement nested record Solution.Money(decimal Amount, string Currency) inside a static holder, plus static Money Add(Money a, Money b) that returns a new Money and throws ArgumentException when the currencies differ.
Press Submit to check your solution.
Back to lesson: Practice: Data modeling workout