Struct Power
- Namespace
- UnitsNet
- Assembly
- UnitsNet.Power.dll
In physics, power is the rate of doing work. It is equivalent to an amount of energy consumed per unit time.
public struct Power
Constructors
Power(double, PowerUnit)
Creates the quantity with the given numeric value and unit.
public Power(double value, PowerUnit unit)
Parameters
value
doubleThe numeric value to construct this quantity with.
unit
PowerUnitThe unit representation to construct this quantity with.
Exceptions
- ArgumentException
If value is NaN or Infinity.
Properties
BaseUnit
The base unit of Power, which is Second. All conversions go via this value.
public static PowerUnit BaseUnit { get; }
Property Value
BoilerHorsepower
Gets a double value of this quantity converted into BoilerHorsepower
public double BoilerHorsepower { get; }
Property Value
BritishThermalUnitsPerHour
Gets a double value of this quantity converted into BritishThermalUnitPerHour
public double BritishThermalUnitsPerHour { get; }
Property Value
Decawatts
public double Decawatts { get; }
Property Value
Deciwatts
public double Deciwatts { get; }
Property Value
ElectricalHorsepower
Gets a double value of this quantity converted into ElectricalHorsepower
public double ElectricalHorsepower { get; }
Property Value
Femtowatts
public double Femtowatts { get; }
Property Value
GigajoulesPerHour
Gets a double value of this quantity converted into GigajoulePerHour
public double GigajoulesPerHour { get; }
Property Value
Gigawatts
public double Gigawatts { get; }
Property Value
HydraulicHorsepower
Gets a double value of this quantity converted into HydraulicHorsepower
public double HydraulicHorsepower { get; }
Property Value
JoulesPerHour
Gets a double value of this quantity converted into JoulePerHour
public double JoulesPerHour { get; }
Property Value
KilobritishThermalUnitsPerHour
Gets a double value of this quantity converted into KilobritishThermalUnitPerHour
public double KilobritishThermalUnitsPerHour { get; }
Property Value
KilojoulesPerHour
Gets a double value of this quantity converted into KilojoulePerHour
public double KilojoulesPerHour { get; }
Property Value
Kilowatts
public double Kilowatts { get; }
Property Value
MaxValue
Represents the largest possible value of Power.
public static Power MaxValue { get; }
Property Value
MechanicalHorsepower
Gets a double value of this quantity converted into MechanicalHorsepower
public double MechanicalHorsepower { get; }
Property Value
MegabritishThermalUnitsPerHour
Gets a double value of this quantity converted into MegabritishThermalUnitPerHour
public double MegabritishThermalUnitsPerHour { get; }
Property Value
MegajoulesPerHour
Gets a double value of this quantity converted into MegajoulePerHour
public double MegajoulesPerHour { get; }
Property Value
Megawatts
public double Megawatts { get; }
Property Value
MetricHorsepower
Gets a double value of this quantity converted into MetricHorsepower
public double MetricHorsepower { get; }
Property Value
Microwatts
public double Microwatts { get; }
Property Value
MillijoulesPerHour
Gets a double value of this quantity converted into MillijoulePerHour
public double MillijoulesPerHour { get; }
Property Value
Milliwatts
public double Milliwatts { get; }
Property Value
MinValue
Represents the smallest possible value of Power.
public static Power MinValue { get; }
Property Value
Nanowatts
public double Nanowatts { get; }
Property Value
Petawatts
public double Petawatts { get; }
Property Value
Picowatts
public double Picowatts { get; }
Property Value
Terawatts
public double Terawatts { get; }
Property Value
TonsOfRefrigeration
Gets a double value of this quantity converted into TonOfRefrigeration
public double TonsOfRefrigeration { get; }
Property Value
Unit
public PowerUnit Unit { get; }
Property Value
Value
The numeric value this quantity was constructed with.
public double Value { get; }
Property Value
Watts
public double Watts { get; }
Property Value
Zero
Gets an instance of this quantity with a value of 0 in the base unit Second.
public static Power Zero { get; }
Property Value
Methods
As(PowerUnit)
Convert to the unit representation unit
.
public double As(PowerUnit unit)
Parameters
unit
PowerUnit
Returns
- double
Value converted to the specified unit.
From(double, PowerUnit)
public static Power From(double value, PowerUnit fromUnit)
Parameters
Returns
- Power
Power unit value.
FromBoilerHorsepower(double)
Creates a Power from BoilerHorsepower.
public static Power FromBoilerHorsepower(double boilerhorsepower)
Parameters
boilerhorsepower
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromBritishThermalUnitsPerHour(double)
Creates a Power from BritishThermalUnitPerHour.
public static Power FromBritishThermalUnitsPerHour(double britishthermalunitsperhour)
Parameters
britishthermalunitsperhour
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromDecawatts(double)
public static Power FromDecawatts(double decawatts)
Parameters
decawatts
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromDeciwatts(double)
public static Power FromDeciwatts(double deciwatts)
Parameters
deciwatts
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromElectricalHorsepower(double)
Creates a Power from ElectricalHorsepower.
public static Power FromElectricalHorsepower(double electricalhorsepower)
Parameters
electricalhorsepower
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromFemtowatts(double)
public static Power FromFemtowatts(double femtowatts)
Parameters
femtowatts
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromGigajoulesPerHour(double)
Creates a Power from GigajoulePerHour.
public static Power FromGigajoulesPerHour(double gigajoulesperhour)
Parameters
gigajoulesperhour
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromGigawatts(double)
public static Power FromGigawatts(double gigawatts)
Parameters
gigawatts
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromHydraulicHorsepower(double)
Creates a Power from HydraulicHorsepower.
public static Power FromHydraulicHorsepower(double hydraulichorsepower)
Parameters
hydraulichorsepower
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromJoulesPerHour(double)
Creates a Power from JoulePerHour.
public static Power FromJoulesPerHour(double joulesperhour)
Parameters
joulesperhour
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromKilobritishThermalUnitsPerHour(double)
Creates a Power from KilobritishThermalUnitPerHour.
public static Power FromKilobritishThermalUnitsPerHour(double kilobritishthermalunitsperhour)
Parameters
kilobritishthermalunitsperhour
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromKilojoulesPerHour(double)
Creates a Power from KilojoulePerHour.
public static Power FromKilojoulesPerHour(double kilojoulesperhour)
Parameters
kilojoulesperhour
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromKilowatts(double)
public static Power FromKilowatts(double kilowatts)
Parameters
kilowatts
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromMechanicalHorsepower(double)
Creates a Power from MechanicalHorsepower.
public static Power FromMechanicalHorsepower(double mechanicalhorsepower)
Parameters
mechanicalhorsepower
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromMegabritishThermalUnitsPerHour(double)
Creates a Power from MegabritishThermalUnitPerHour.
public static Power FromMegabritishThermalUnitsPerHour(double megabritishthermalunitsperhour)
Parameters
megabritishthermalunitsperhour
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromMegajoulesPerHour(double)
Creates a Power from MegajoulePerHour.
public static Power FromMegajoulesPerHour(double megajoulesperhour)
Parameters
megajoulesperhour
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromMegawatts(double)
public static Power FromMegawatts(double megawatts)
Parameters
megawatts
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromMetricHorsepower(double)
Creates a Power from MetricHorsepower.
public static Power FromMetricHorsepower(double metrichorsepower)
Parameters
metrichorsepower
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromMicrowatts(double)
public static Power FromMicrowatts(double microwatts)
Parameters
microwatts
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromMillijoulesPerHour(double)
Creates a Power from MillijoulePerHour.
public static Power FromMillijoulesPerHour(double millijoulesperhour)
Parameters
millijoulesperhour
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromMilliwatts(double)
public static Power FromMilliwatts(double milliwatts)
Parameters
milliwatts
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromNanowatts(double)
public static Power FromNanowatts(double nanowatts)
Parameters
nanowatts
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromPetawatts(double)
public static Power FromPetawatts(double petawatts)
Parameters
petawatts
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromPicowatts(double)
public static Power FromPicowatts(double picowatts)
Parameters
picowatts
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromTerawatts(double)
public static Power FromTerawatts(double terawatts)
Parameters
terawatts
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromTonsOfRefrigeration(double)
Creates a Power from TonOfRefrigeration.
public static Power FromTonsOfRefrigeration(double tonsofrefrigeration)
Parameters
tonsofrefrigeration
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromWatts(double)
public static Power FromWatts(double watts)
Parameters
watts
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
ToUnit(PowerUnit)
Converts this Power to another Power with the unit representation unit
.
public Power ToUnit(PowerUnit unit)
Parameters
unit
PowerUnit
Returns
- Power
A Power with the specified unit.