Struct ElectricPotential
- Namespace
- UnitsNet
- Assembly
- UnitsNet.ElectricPotential.dll
In classical electromagnetism, the electric potential (a scalar quantity denoted by Φ, ΦE or V and also called the electric field potential or the electrostatic potential) at a point is the amount of electric potential energy that a unitary point charge would have when located at that point.
public struct ElectricPotential
Constructors
ElectricPotential(double, ElectricPotentialUnit)
Creates the quantity with the given numeric value and unit.
public ElectricPotential(double value, ElectricPotentialUnit unit)
Parameters
value
doubleThe numeric value to construct this quantity with.
unit
ElectricPotentialUnitThe unit representation to construct this quantity with.
Exceptions
- ArgumentException
If value is NaN or Infinity.
Properties
BaseUnit
The base unit of ElectricPotential, which is Second. All conversions go via this value.
public static ElectricPotentialUnit BaseUnit { get; }
Property Value
Kilovolts
public double Kilovolts { get; }
Property Value
MaxValue
Represents the largest possible value of ElectricPotential.
public static ElectricPotential MaxValue { get; }
Property Value
Megavolts
public double Megavolts { get; }
Property Value
Microvolts
public double Microvolts { get; }
Property Value
Millivolts
public double Millivolts { get; }
Property Value
MinValue
Represents the smallest possible value of ElectricPotential.
public static ElectricPotential MinValue { get; }
Property Value
Nanovolts
public double Nanovolts { get; }
Property Value
Unit
public ElectricPotentialUnit Unit { get; }
Property Value
Value
The numeric value this quantity was constructed with.
public double Value { get; }
Property Value
Volts
public double Volts { get; }
Property Value
Zero
Gets an instance of this quantity with a value of 0 in the base unit Second.
public static ElectricPotential Zero { get; }
Property Value
Methods
As(ElectricPotentialUnit)
Convert to the unit representation unit
.
public double As(ElectricPotentialUnit unit)
Parameters
Returns
- double
Value converted to the specified unit.
From(double, ElectricPotentialUnit)
Dynamically convert from value and unit enum ElectricPotentialUnit to ElectricPotential.
public static ElectricPotential From(double value, ElectricPotentialUnit fromUnit)
Parameters
value
doubleValue to convert from.
fromUnit
ElectricPotentialUnitUnit to convert from.
Returns
- ElectricPotential
ElectricPotential unit value.
FromKilovolts(double)
Creates a ElectricPotential from Kilovolt.
public static ElectricPotential FromKilovolts(double kilovolts)
Parameters
kilovolts
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromMegavolts(double)
Creates a ElectricPotential from Megavolt.
public static ElectricPotential FromMegavolts(double megavolts)
Parameters
megavolts
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromMicrovolts(double)
Creates a ElectricPotential from Microvolt.
public static ElectricPotential FromMicrovolts(double microvolts)
Parameters
microvolts
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromMillivolts(double)
Creates a ElectricPotential from Millivolt.
public static ElectricPotential FromMillivolts(double millivolts)
Parameters
millivolts
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromNanovolts(double)
Creates a ElectricPotential from Nanovolt.
public static ElectricPotential FromNanovolts(double nanovolts)
Parameters
nanovolts
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromVolts(double)
Creates a ElectricPotential from Volt.
public static ElectricPotential FromVolts(double volts)
Parameters
volts
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
ToUnit(ElectricPotentialUnit)
Converts this ElectricPotential to another ElectricPotential with the unit representation unit
.
public ElectricPotential ToUnit(ElectricPotentialUnit unit)
Parameters
Returns
- ElectricPotential
A ElectricPotential with the specified unit.