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

17 lines
498 B
C#

namespace InnovEnergy.Lib.Units.Power;
public sealed class ApparentPower : Power
{
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));
}
public static implicit operator ApparentPower(Double d) => new ApparentPower(d);
public static implicit operator Double(ApparentPower d) => d.Value;
}