3 public struct MoneyValue
5 private readonly decimal _amount
;
7 public MoneyValue (decimal amount
)
12 public static implicit operator decimal (MoneyValue moneyValue
)
14 return moneyValue
._amount
;
22 var nullMoneyValue
= (MoneyValue
?) null;
23 var moneyValue
= new MoneyValue (123);
25 var crashApplication
= nullMoneyValue
< moneyValue
;
27 Console
.WriteLine("All OK");