add fp2 sample
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
namespace CsharpFp2.Domain;
|
||||
|
||||
public sealed record Money(decimal Amount)
|
||||
{
|
||||
public Money Add(Money other) => new(Amount + other.Amount);
|
||||
|
||||
public Money Subtract(Money other) => new(Amount - other.Amount);
|
||||
}
|
||||
Reference in New Issue
Block a user