Innovenergy_trunk/csharp/Lib/Units/ApparentPower.cs

16 lines
394 B
C#
Raw Normal View History

2023-02-26 14:39:55 +00:00
using InnovEnergy.Lib.Units.Generator;
namespace InnovEnergy.Lib.Units;
[Generate]
2023-02-26 14:39:55 +00:00
public readonly partial struct ApparentPower
{
public static String Unit => "VA";
public static String Symbol => "S";
public ApparentPower(Decimal value)
{
if (value < 0) throw new ArgumentException("Apparent power cannot be negative", nameof(value));
Value = value;
}
}