Innovenergy_trunk/csharp/Lib/Units/Power/ApparentPower.cs

17 lines
498 B
C#
Raw Normal View History

2023-06-13 11:03:49 +00:00
namespace InnovEnergy.Lib.Units.Power;
2023-09-01 08:03:29 +00:00
public sealed class ApparentPower : Power
2023-06-13 11:03:49 +00:00
{
public override String Symbol => "VA";
public ApparentPower(Double value) : base(value)
{
if (value < 0)
throw new ArgumentException($"{nameof(ApparentPower)} cannot be negative by definition.", nameof(value));
2023-06-13 11:03:49 +00:00
}
public static implicit operator ApparentPower(Double d) => new ApparentPower(d);
public static implicit operator Double(ApparentPower d) => d.Value;
}