Table of Contents

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 double

The numeric value to construct this quantity with.

unit PowerUnit

The 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

PowerUnit

BoilerHorsepower

Gets a double value of this quantity converted into BoilerHorsepower

public double BoilerHorsepower { get; }

Property Value

double

BritishThermalUnitsPerHour

Gets a double value of this quantity converted into BritishThermalUnitPerHour

public double BritishThermalUnitsPerHour { get; }

Property Value

double

Decawatts

Gets a double value of this quantity converted into Decawatt

public double Decawatts { get; }

Property Value

double

Deciwatts

Gets a double value of this quantity converted into Deciwatt

public double Deciwatts { get; }

Property Value

double

ElectricalHorsepower

Gets a double value of this quantity converted into ElectricalHorsepower

public double ElectricalHorsepower { get; }

Property Value

double

Femtowatts

Gets a double value of this quantity converted into Femtowatt

public double Femtowatts { get; }

Property Value

double

GigajoulesPerHour

Gets a double value of this quantity converted into GigajoulePerHour

public double GigajoulesPerHour { get; }

Property Value

double

Gigawatts

Gets a double value of this quantity converted into Gigawatt

public double Gigawatts { get; }

Property Value

double

HydraulicHorsepower

Gets a double value of this quantity converted into HydraulicHorsepower

public double HydraulicHorsepower { get; }

Property Value

double

JoulesPerHour

Gets a double value of this quantity converted into JoulePerHour

public double JoulesPerHour { get; }

Property Value

double

KilobritishThermalUnitsPerHour

Gets a double value of this quantity converted into KilobritishThermalUnitPerHour

public double KilobritishThermalUnitsPerHour { get; }

Property Value

double

KilojoulesPerHour

Gets a double value of this quantity converted into KilojoulePerHour

public double KilojoulesPerHour { get; }

Property Value

double

Kilowatts

Gets a double value of this quantity converted into Kilowatt

public double Kilowatts { get; }

Property Value

double

MaxValue

Represents the largest possible value of Power.

public static Power MaxValue { get; }

Property Value

Power

MechanicalHorsepower

Gets a double value of this quantity converted into MechanicalHorsepower

public double MechanicalHorsepower { get; }

Property Value

double

MegabritishThermalUnitsPerHour

Gets a double value of this quantity converted into MegabritishThermalUnitPerHour

public double MegabritishThermalUnitsPerHour { get; }

Property Value

double

MegajoulesPerHour

Gets a double value of this quantity converted into MegajoulePerHour

public double MegajoulesPerHour { get; }

Property Value

double

Megawatts

Gets a double value of this quantity converted into Megawatt

public double Megawatts { get; }

Property Value

double

MetricHorsepower

Gets a double value of this quantity converted into MetricHorsepower

public double MetricHorsepower { get; }

Property Value

double

Microwatts

Gets a double value of this quantity converted into Microwatt

public double Microwatts { get; }

Property Value

double

MillijoulesPerHour

Gets a double value of this quantity converted into MillijoulePerHour

public double MillijoulesPerHour { get; }

Property Value

double

Milliwatts

Gets a double value of this quantity converted into Milliwatt

public double Milliwatts { get; }

Property Value

double

MinValue

Represents the smallest possible value of Power.

public static Power MinValue { get; }

Property Value

Power

Nanowatts

Gets a double value of this quantity converted into Nanowatt

public double Nanowatts { get; }

Property Value

double

Petawatts

Gets a double value of this quantity converted into Petawatt

public double Petawatts { get; }

Property Value

double

Picowatts

Gets a double value of this quantity converted into Picowatt

public double Picowatts { get; }

Property Value

double

Terawatts

Gets a double value of this quantity converted into Terawatt

public double Terawatts { get; }

Property Value

double

Unit

public PowerUnit Unit { get; }

Property Value

PowerUnit

Value

The numeric value this quantity was constructed with.

public double Value { get; }

Property Value

double

Watts

Gets a double value of this quantity converted into Watt

public double Watts { get; }

Property Value

double

Zero

Gets an instance of this quantity with a value of 0 in the base unit Second.

public static Power Zero { get; }

Property Value

Power

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)

Dynamically convert from value and unit enum PowerUnit to Power.

public static Power From(double value, PowerUnit fromUnit)

Parameters

value double

Value to convert from.

fromUnit PowerUnit

Unit to convert from.

Returns

Power

Power unit value.

FromBoilerHorsepower(double)

Creates a Power from BoilerHorsepower.

public static Power FromBoilerHorsepower(double boilerhorsepower)

Parameters

boilerhorsepower double

Returns

Power

Exceptions

ArgumentException

If value is NaN or Infinity.

FromBritishThermalUnitsPerHour(double)

public static Power FromBritishThermalUnitsPerHour(double britishthermalunitsperhour)

Parameters

britishthermalunitsperhour double

Returns

Power

Exceptions

ArgumentException

If value is NaN or Infinity.

FromDecawatts(double)

Creates a Power from Decawatt.

public static Power FromDecawatts(double decawatts)

Parameters

decawatts double

Returns

Power

Exceptions

ArgumentException

If value is NaN or Infinity.

FromDeciwatts(double)

Creates a Power from Deciwatt.

public static Power FromDeciwatts(double deciwatts)

Parameters

deciwatts double

Returns

Power

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

Power

Exceptions

ArgumentException

If value is NaN or Infinity.

FromFemtowatts(double)

Creates a Power from Femtowatt.

public static Power FromFemtowatts(double femtowatts)

Parameters

femtowatts double

Returns

Power

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

Power

Exceptions

ArgumentException

If value is NaN or Infinity.

FromGigawatts(double)

Creates a Power from Gigawatt.

public static Power FromGigawatts(double gigawatts)

Parameters

gigawatts double

Returns

Power

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

Power

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

Power

Exceptions

ArgumentException

If value is NaN or Infinity.

FromKilobritishThermalUnitsPerHour(double)

public static Power FromKilobritishThermalUnitsPerHour(double kilobritishthermalunitsperhour)

Parameters

kilobritishthermalunitsperhour double

Returns

Power

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

Power

Exceptions

ArgumentException

If value is NaN or Infinity.

FromKilowatts(double)

Creates a Power from Kilowatt.

public static Power FromKilowatts(double kilowatts)

Parameters

kilowatts double

Returns

Power

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

Power

Exceptions

ArgumentException

If value is NaN or Infinity.

FromMegabritishThermalUnitsPerHour(double)

public static Power FromMegabritishThermalUnitsPerHour(double megabritishthermalunitsperhour)

Parameters

megabritishthermalunitsperhour double

Returns

Power

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

Power

Exceptions

ArgumentException

If value is NaN or Infinity.

FromMegawatts(double)

Creates a Power from Megawatt.

public static Power FromMegawatts(double megawatts)

Parameters

megawatts double

Returns

Power

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

Power

Exceptions

ArgumentException

If value is NaN or Infinity.

FromMicrowatts(double)

Creates a Power from Microwatt.

public static Power FromMicrowatts(double microwatts)

Parameters

microwatts double

Returns

Power

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

Power

Exceptions

ArgumentException

If value is NaN or Infinity.

FromMilliwatts(double)

Creates a Power from Milliwatt.

public static Power FromMilliwatts(double milliwatts)

Parameters

milliwatts double

Returns

Power

Exceptions

ArgumentException

If value is NaN or Infinity.

FromNanowatts(double)

Creates a Power from Nanowatt.

public static Power FromNanowatts(double nanowatts)

Parameters

nanowatts double

Returns

Power

Exceptions

ArgumentException

If value is NaN or Infinity.

FromPetawatts(double)

Creates a Power from Petawatt.

public static Power FromPetawatts(double petawatts)

Parameters

petawatts double

Returns

Power

Exceptions

ArgumentException

If value is NaN or Infinity.

FromPicowatts(double)

Creates a Power from Picowatt.

public static Power FromPicowatts(double picowatts)

Parameters

picowatts double

Returns

Power

Exceptions

ArgumentException

If value is NaN or Infinity.

FromTerawatts(double)

Creates a Power from Terawatt.

public static Power FromTerawatts(double terawatts)

Parameters

terawatts double

Returns

Power

Exceptions

ArgumentException

If value is NaN or Infinity.

FromWatts(double)

Creates a Power from Watt.

public static Power FromWatts(double watts)

Parameters

watts double

Returns

Power

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.