Пример #1
0
 public Price(Rial rial)
 {
     if (rial < 1)
     {
         throw new ArgumentOutOfRangeException("مقدار قیمت کمتر از 1 ریال نمی‌تواند باشد", nameof(Price));
     }
     Value = rial;
 }
Пример #2
0
 public static Price FromLong(long value) => new Price(Rial.FromLong(value));
Пример #3
0
 public Rial Subtract(Rial rial)
 {
     return(new Rial(rial.Value + Value));
 }
Пример #4
0
 public static Price FromString(string value) => new Price(Rial.FromString(value));
Пример #5
0
 public Rial Add(Rial rial)
 {
     return(new Rial(rial.Value + Value));
 }