29 lines
594 B
C#
29 lines
594 B
C#
|
|
|
|
namespace NejCommon.Models
|
|
{
|
|
/// <summary>
|
|
/// A value with a currency
|
|
/// </summary>
|
|
public class CurrencyValue
|
|
{
|
|
public CurrencyValue()
|
|
{
|
|
Currency = Currency.EUR;
|
|
Value = 0;
|
|
}
|
|
public CurrencyValue(Currency currency, decimal value)
|
|
{
|
|
Value = value;
|
|
Currency = currency;
|
|
}
|
|
public decimal Value { get; set; }
|
|
public Currency Currency { get; set; }
|
|
|
|
public override string ToString()
|
|
{
|
|
return $"{Value} {Currency}";
|
|
}
|
|
}
|
|
}
|